build: make contrib/make_release callable from a different destdir
This commit is contained in:
parent
99aefc8d22
commit
672f85a58c
1 changed files with 5 additions and 4 deletions
|
@ -1,12 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
DESTDIR="$(pwd)/release"
|
||||||
BASEDIR="$(cd "$(dirname "$0")/.." && pwd)"
|
BASEDIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
APPNAME="$(basename "$BASEDIR")"
|
APPNAME="$(basename "$BASEDIR")"
|
||||||
|
|
||||||
cd "$BASEDIR"
|
cd "$BASEDIR"
|
||||||
|
|
||||||
if [ -e "release" ]; then
|
if [ -e "$DESTDIR" ]; then
|
||||||
echo directory \"release\" already exists
|
echo directory \"release\" already exists
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -17,9 +18,9 @@ echo running tests...
|
||||||
|
|
||||||
echo building...
|
echo building...
|
||||||
|
|
||||||
./zig build -Dpackage_release --prefix release/build
|
./zig build -Dpackage_release --prefix "$DESTDIR/build"
|
||||||
|
|
||||||
cd release/build
|
cd "$DESTDIR/build"
|
||||||
|
|
||||||
VERSION=$(/bin/cat version)
|
VERSION=$(/bin/cat version)
|
||||||
TARGETS=$(/bin/ls)
|
TARGETS=$(/bin/ls)
|
||||||
|
@ -44,7 +45,7 @@ for tarfile in $TARFILES; do
|
||||||
sha256sum -b "$tarfile" > "${tarfile}.sha256"
|
sha256sum -b "$tarfile" > "${tarfile}.sha256"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "done making release $VERSION"
|
echo "done making release $VERSION @ $DESTDIR"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
/bin/ls -lah
|
/bin/ls -lah
|
||||||
|
|
Loading…
Add table
Reference in a new issue