From f61f253cacdcaf748c85eae9fccd2421f551f518 Mon Sep 17 00:00:00 2001 From: Huang Wei Date: Wed, 29 Nov 2023 18:12:21 +0800 Subject: [PATCH] build: support build on no tag --- .github/workflows/other-os-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/other-os-build.yml b/.github/workflows/other-os-build.yml index aa63c3cc19a..5d11df4a351 100644 --- a/.github/workflows/other-os-build.yml +++ b/.github/workflows/other-os-build.yml @@ -46,7 +46,8 @@ jobs: - name: prepare release run: | VERSION="snapshot" - TAG=$(git tag -l | grep $(git describe HEAD)) + # if not tag, return error, just ignore it to use snapshot as the version + TAG=$(git tag -l | grep $(git describe HEAD)) || true if [[ "${TAG}" == "v"* ]]; then VERSION=${TAG#v} bash steps/prepare_release.sh "$VERSION" @@ -172,7 +173,7 @@ jobs: run: | VERSION="snapshot" # use repo ref not event ref - TAG=$(git tag -l | grep $(git describe HEAD)) + TAG=$(git tag -l | grep $(git describe HEAD)) || true if [[ "${TAG}" == "v"* ]]; then VERSION=${TAG#v} bash steps/prepare_release.sh "$VERSION" @@ -242,7 +243,7 @@ jobs: - name: prepare release run: | VERSION="snapshot" - TAG=$(git tag -l | grep $(git describe HEAD)) + TAG=$(git tag -l | grep $(git describe HEAD)) || true if [[ "${TAG}" == "v"* ]]; then VERSION=${TAG#v} bash steps/prepare_release.sh "$VERSION"