From 20a707e8e8ada6e774fe2499cea61bacca1bdbd1 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Mon, 18 Mar 2024 00:10:07 -0700 Subject: [PATCH] Fix build with with tagged commit --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ceb8610..b80cb675 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: run: | gem install --no-document --user-install nokogiri export COMMITS_SINCE_LAST_TAG=$(git describe --tags --always --long | awk -F '-' '{print $2}') - EXTENSION_VERSION=$(ruby -e 'print [ARGF.read[/PHP_COUCHBASE_VERSION "(\d+\.\d+\.\d+)"/, 1], ENV["COMMITS_SINCE_LAST_TAG"]].compact.join(".")' src/php_couchbase.hxx) + EXTENSION_VERSION=$(ruby -e 'print [ARGF.read[/PHP_COUCHBASE_VERSION "(\d+\.\d+\.\d+)"/, 1], ENV["COMMITS_SINCE_LAST_TAG"].to_i > 0 ? ENV["COMMITS_SINCE_LAST_TAG"] : nil].compact.join(".")' src/php_couchbase.hxx) echo "extension_version=${EXTENSION_VERSION}" >> "$GITHUB_OUTPUT" export BUILD_NUMBER="${COMMITS_SINCE_LAST_TAG}" ruby ./bin/package.rb