mirror of
https://github.com/SeriousBug/gandi-live-dns-rust
synced 2024-12-28 08:10:14 -06:00
read version correctly in release script
This commit is contained in:
parent
7cffca51af
commit
35d60f0b29
|
@ -44,25 +44,24 @@ declare -A DOCKER_TARGETS=(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get the version number
|
# Get the version number
|
||||||
VERSION=$(sed -nr 's/^version *= *"([0-9.]+)"/\1/p' Cargo.toml)
|
VERSION=$(sed -nr 's/^version *= *"([0-9.]+)"/\1/p' Cargo.toml | head --lines=1)
|
||||||
|
|
||||||
# Make the builds
|
# Make the builds
|
||||||
for target in "${!TARGETS[@]}"; do
|
for target in "${!TARGETS[@]}"; do
|
||||||
echo Building "${target}"
|
echo Building "${target}"
|
||||||
cross build -j $(($(nproc) / 2)) --release --target "${target}"
|
cross build -j $(($(nproc) / 2)) --release --target "${target}"
|
||||||
if [[ "${target}" =~ .*"windows".* ]] ; then
|
if [[ "${target}" =~ .*"windows".* ]]; then
|
||||||
zip -j "gandi-live-dns.${VERSION}.${TARGETS[${target}]}.zip" target/"${target}"/release/gandi-live-dns.exe 1>/dev/null
|
zip -j "gandi-live-dns.${VERSION}.${TARGETS[${target}]}.zip" target/"${target}"/release/gandi-live-dns.exe 1>/dev/null
|
||||||
else
|
else
|
||||||
tar -acf "gandi-live-dns.${VERSION}.${TARGETS[${target}]}.tar.xz" -C "target/${target}/release/" "gandi-live-dns"
|
tar -acf "gandi-live-dns.${VERSION}.${TARGETS[${target}]}.tar.xz" -C "target/${target}/release/" "gandi-live-dns"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$#" -ge 2 && "$1" = "--no-docker" ]] ; then
|
if [[ "$#" -ge 2 && "$1" = "--no-docker" ]]; then
|
||||||
echo "Exiting without releasing to docker"
|
echo "Exiting without releasing to docker"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Copy files into place so Docker can get them easily
|
# Copy files into place so Docker can get them easily
|
||||||
cd Docker
|
cd Docker
|
||||||
echo Building Docker images
|
echo Building Docker images
|
||||||
|
|
Loading…
Reference in a new issue