From 72f754c6cf6f590121dd54a7b544b3f39634d218 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Mon, 23 Oct 2023 07:43:55 -0500 Subject: [PATCH] macos: use commit hash in version info instead of build number Using the "build number" (i.e. the commit number) did not seem to work correctly anyway (it always showed '1' for releases built in CI). Presumably this is because GitHub performs a shallow clone so it does not have full access to the Git history. Instead of the build number, use the Git commit hash of HEAD, which works even for shallow clones and is more useful for debugging. --- .github/workflows/release-tip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-tip.yml b/.github/workflows/release-tip.yml index 81d2b633f..d0499e507 100644 --- a/.github/workflows/release-tip.yml +++ b/.github/workflows/release-tip.yml @@ -49,7 +49,7 @@ jobs: # Load Build Number - name: Build Number run: | - echo "GHOSTTY_BUILD=$(git rev-list --count head)" >> $GITHUB_ENV + echo "GHOSTTY_BUILD=$(git rev-parse --short HEAD)" >> $GITHUB_ENV # GhosttyKit is the framework that is built from Zig for our native # Mac app to access. Build this in release mode.