From 8fea653c613331cf465b2ba4a80db83020610d3a Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 19 Nov 2020 10:17:10 +0100 Subject: [PATCH] release: skip version check in automated builds --- .github/workflows/release.yaml | 2 +- scripts/release.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b36596be..c156ad35 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,7 +42,7 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: build release for all architectures - run: make release tag=${{ env.RELEASE_VERSION }} + run: SKIP_VERSION_CHECK=1 make release tag=${{ env.RELEASE_VERSION }} - name: Create Release uses: softprops/action-gh-release@v1 diff --git a/scripts/release.sh b/scripts/release.sh index ca650180..e73ab3ba 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -29,6 +29,13 @@ function red() { function check_tag_correct() { local tag=$1 + # For automated builds we can skip this check as they will only be triggered + # on tags. + if [[ "$SKIP_VERSION_CHECK" -eq "1" ]]; then + green "skipping version check, assuming automated build" + exit 0 + fi + # If a tag is specified, ensure that that tag is present and checked out. if [[ $tag != $(git describe) ]]; then red "tag $tag not checked out"