diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 3da91037e01..879d07bec20 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -37,6 +37,7 @@ jobs: echo FSTAR_VERSION="nightly-$(date -I)" >> $GITHUB_ENV elif [[ "${{github.workflow_ref}}" =~ "release.yml" ]]; then echo FSTAR_VERSION="$(cat version.txt)" >> $GITHUB_ENV + echo FSTAR_RELEASE=1 >> $GITHUB_ENV fi # NB: release workflow later adds version number to the name diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 6c9863cc302..4a9d2748e00 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -29,6 +29,7 @@ jobs: echo FSTAR_VERSION="nightly-$(date -I)" >> $GITHUB_ENV elif [[ "${{github.workflow_ref}}" =~ "release.yml" ]]; then echo FSTAR_VERSION="$(cat version.txt)" >> $GITHUB_ENV + echo FSTAR_RELEASE=1 >> $GITHUB_ENV fi # Note *g*make below! diff --git a/.scripts/mk-package.sh b/.scripts/mk-package.sh index 7d37bed1062..7a02148b960 100755 --- a/.scripts/mk-package.sh +++ b/.scripts/mk-package.sh @@ -32,6 +32,10 @@ windows () { [[ "${OS:-}" = "Windows_NT" ]] } +release () { + [[ -n "${FSTAR_RELEASE:-}" ]] +} + # Computes a (hopefully) sensible default for the current system detect_format () { if windows; then @@ -67,7 +71,7 @@ case $FSTAR_PACKAGE_FORMAT in ATGT="$(realpath "$TGT")" pushd "$PREFIX" >/dev/null LEVEL= - if [ -v FSTAR_RELEASE ]; then + if release; then LEVEL=-9 fi $WRAP zip -q -r $LEVEL "$ATGT" . @@ -77,7 +81,7 @@ case $FSTAR_PACKAGE_FORMAT in TGT="$ARCHIVE.zip" ATGT="$(realpath "$TGT")" LEVEL= - if [ -v FSTAR_RELEASE ]; then + if release; then LEVEL=-mx9 fi pushd "$PREFIX" >/dev/null @@ -89,7 +93,7 @@ case $FSTAR_PACKAGE_FORMAT in TGT="$ARCHIVE.tar.gz" $WRAP tar cf "$ARCHIVE.tar" -h -C "$PREFIX" . LEVEL= - if [ -v FSTAR_RELEASE ]; then + if release; then LEVEL=-9 fi $WRAP gzip -f $LEVEL "$ARCHIVE.tar"