diff --git a/.gitignore b/.gitignore index 4a17b62..b0aa1d1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ feather.AppDir/* src/assets/tor/* !src/assets/tor/.gitkeep guix-build-* -contrib/installers/windows/setup.nsi \ No newline at end of file +contrib/installers/windows/setup.nsi +githash.txt diff --git a/cmake/config-feather.h.cmake b/cmake/config-feather.h.cmake index 1e9f3f4..55fa424 100644 --- a/cmake/config-feather.h.cmake +++ b/cmake/config-feather.h.cmake @@ -1,7 +1,7 @@ #ifndef FEATHER_VERSION_H #define FEATHER_VERSION_H -#define FEATHER_VERSION "@VERSION@" +#define FEATHER_VERSION "@PROJECT_VERSION@" #define FEATHER_COMMIT "@FEATHER_COMMIT@" #define TOR_VERSION "@TOR_VERSION@" diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 7b6aa08..4bc23a8 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -7,6 +7,9 @@ export LC_ALL=C set -e -o pipefail export TZ=UTC +# shellcheck source=contrib/shell/git-utils.bash +source contrib/shell/git-utils.bash + # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix # environment`. It does make sense for at least `guix environment --container` @@ -227,7 +230,8 @@ GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz" # Create the source tarball if not already there if [ ! -e "$GIT_ARCHIVE" ]; then mkdir -p "$(dirname "$GIT_ARCHIVE")" - git ls-files --recurse-submodules | tar --transform 's,^,$DISTNAME/,' -caf ${GIT_ARCHIVE} -T- + echo "$(git_head_version)" > githash.txt + ( git ls-files --recurse-submodules ; echo "githash.txt" ) | cat | tar --transform 's,^,$DISTNAME/,' -caf ${GIT_ARCHIVE} -T- sha256sum "$GIT_ARCHIVE" fi