From e30fa878edb2dd06474ff069574846b58cdf37ec Mon Sep 17 00:00:00 2001 From: Edward Li Date: Mon, 13 Jan 2025 03:49:20 +0800 Subject: [PATCH] test --- .github/workflows/c-cpp.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index dd88643b24..bfc5030b0d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -54,6 +54,23 @@ jobs: hdiutil detach /Volumes/VulkanSDK echo "VULKAN_SDK=$HOME/VulkanSDK/macOS" >> $GITHUB_ENV if: runner.os == 'macOS' + + - name: test semver + run: | + VERSION=$(git describe --tags --always --match "gdxsv-*" | sed -E "s/-([0-9]+)-g(.+)$/-dev.\\1+\\2/g") + echo $VERSION + # Check if the version is a dev version and increment the patch number + if [[ "$VERSION" =~ -dev\.([0-9]+) ]]; then + # Extract the current patch version + PATCH_VERSION="${BASH_REMATCH[1]}" + # Increment the patch version + PATCH_VERSION=$((PATCH_VERSION + 1)) + # Replace the old patch version with the new one + VERSION=$(echo "$VERSION" | sed -E "s/-dev\.[0-9]+/-dev.${PATCH_VERSION}/") + fi + echo $VERSION + + shell: bash - name: Set up build environment (Linux) run: |