From 8fa1a88b5bdde78d532f14d6cf103fd1196bf585 Mon Sep 17 00:00:00 2001 From: andreasgriffin Date: Sat, 21 Dec 2024 07:37:37 +0100 Subject: [PATCH] optional commit hash in workflow --- .github/workflows/build-mac-test.yml | 10 +++++++--- tools/build-mac/make_osx.sh | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-mac-test.yml b/.github/workflows/build-mac-test.yml index 03854ec..493c02f 100644 --- a/.github/workflows/build-mac-test.yml +++ b/.github/workflows/build-mac-test.yml @@ -1,9 +1,12 @@ name: Build Test DMG - on: workflow_dispatch: inputs: - tags: + commitHash: + description: 'Enter the commit hash to build (leave empty for the latest commit)' + required: false + type: string + buildDMG: description: 'Test Build DMG' required: false type: boolean @@ -22,7 +25,8 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history for all branches and tags - + # Checkout the provided commit hash or the latest commit from the default branch + ref: ${{ github.event.inputs.commitHash || 'refs/heads/main' }} - name: Run build script diff --git a/tools/build-mac/make_osx.sh b/tools/build-mac/make_osx.sh index edbccc7..05c92ae 100755 --- a/tools/build-mac/make_osx.sh +++ b/tools/build-mac/make_osx.sh @@ -195,7 +195,7 @@ $python3 -m pip uninstall -y pip info "Faking timestamps..." -find . -exec touch -t '200101220000' {} + || true +find . -exec sudo touch -t '200101220000' {} + || true VERSION=$(git describe --tags --dirty --always)