summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorParadox84 <nurullahcitil1536@gmail.com>2025-03-15 19:11:42 +0300
committerGitHub <noreply@github.com>2025-03-15 09:11:42 -0700
commit18e6611ba8ed54b095e06e950bc357e4dd3b6d6f (patch)
treeb5c538ec83767da3c6437f97ec9d799f4e060292 /.github
parent78517dc392f0d2ebba25f0ac3f4d4e004b0f0ab0 (diff)
fix trimming of "v" from version string (#6605)
Current releases are removing "v" from "vulkan-sdk-1.4.309.0" when they were supposed to remove it from something like "v1.2.4" https://github.com/shader-slang/slang/releases/tag/vulkan-sdk-1.4.309.0 Fixed it so it only removes "v", if next character is a number Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release-linux-glibc-2-17.yml6
-rw-r--r--.github/workflows/release.yml7
2 files changed, 11 insertions, 2 deletions
diff --git a/.github/workflows/release-linux-glibc-2-17.yml b/.github/workflows/release-linux-glibc-2-17.yml
index 4c9485d1e..141efb4c2 100644
--- a/.github/workflows/release-linux-glibc-2-17.yml
+++ b/.github/workflows/release-linux-glibc-2-17.yml
@@ -35,7 +35,11 @@ jobs:
id: package
run: |
triggering_ref=${{ github.ref_name }}
- version=${triggering_ref#v}
+ if [[ $triggering_ref =~ ^v[0-9] ]]; then
+ version=${triggering_ref#v}
+ else
+ version=$triggering_ref
+ fi
base=$(pwd)/slang-${version}-linux-x86_64-glibc-2.17
sudo mv "$(pwd)/build/dist-release/slang.zip" "${base}.zip"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f715bcaf8..da5577c7c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -169,7 +169,12 @@ jobs:
cpack --preset "$config-debug-info" -G TGZ
triggering_ref=${{ github.ref_name }}
- base=slang-${triggering_ref#v}-${{matrix.os}}-${{matrix.platform}}
+ if [[ $triggering_ref =~ ^v[0-9] ]]; then
+ version=${triggering_ref#v}
+ else
+ version=$triggering_ref
+ fi
+ base=slang-${version}-${{matrix.os}}-${{matrix.platform}}
# Move main packages
mv "$(pwd)/build/dist-${config}/slang.zip" "${base}.zip"