Use gh-describe to store `git describe` in environment

This commit is contained in:
Hielke Morsink 2022-04-20 21:37:52 +02:00
parent 779f0d995a
commit e571ab6ba8
No known key found for this signature in database
GPG Key ID: FE0B343DF883E7F2
2 changed files with 5 additions and 1 deletions

View File

@ -66,6 +66,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Git describe for shallow checkout
id: ghd
uses: proudust/gh-describe@v1
- name: Update GA environment
run: echo "OPENRCT2_DESCRIBE=${{ steps.ghd.outputs.describe }}" >> $GITHUB_ENV
- name: Install MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Build OpenRCT2

View File

@ -14,7 +14,6 @@ fi
echo -e "\033[0;36mSetting up environment for OpenRCT2...\033[0m"
# Get the build number (number of commits since last tag)
export OPENRCT2_DESCRIBE=$(git describe HEAD)
get_build_number()
{
local pattern='.+-([0-9]+)-.+'