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.
pull/719/head
Gregory Anders 2023-10-23 07:43:55 -05:00
parent 76e0e89a3d
commit 72f754c6cf
1 changed files with 1 additions and 1 deletions

View File

@ -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.