2023-03-25 14:58:20 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
scriptDir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)
|
|
|
|
cd "$scriptDir"
|
|
|
|
|
|
|
|
printf "Release name (e.g. \"v0.1.2\"): "
|
|
|
|
read -r releaseName
|
|
|
|
|
|
|
|
releasesDir="$(pwd)/releases"
|
|
|
|
mkdir -p "$releasesDir"
|
|
|
|
echo '*' > "$releasesDir"/.gitignore
|
|
|
|
|
|
|
|
out="$releasesDir/$releaseName"
|
|
|
|
|
2023-08-30 16:24:09 +00:00
|
|
|
revision=$(git rev-parse HEAD)
|
|
|
|
|
2024-03-11 22:22:42 +00:00
|
|
|
result=$(nix-build -v \
|
2023-08-30 16:24:09 +00:00
|
|
|
--argstr revision "$revision" \
|
2023-03-25 14:58:20 +00:00
|
|
|
--argstr releaseName "$releaseName" \
|
|
|
|
--no-out-link \
|
|
|
|
release.nix \
|
|
|
|
)
|
|
|
|
|
|
|
|
cp -rL "$result" "$out"
|
|
|
|
chmod u+w -R "$out"
|
|
|
|
|
|
|
|
cd "$out"
|
|
|
|
gpg -a --detach-sign -o sha256.txt.gpg ./sha256.txt
|
|
|
|
|
|
|
|
echo "Release successfully created: $out"
|