Skip to content

Commit d75b63f

Browse files
committed
修改snapshot版本号脚本和工作流
Change-Id: I8634db0c28130d1f41eb9f0276d99fccfd53ebf0
1 parent 7be4a08 commit d75b63f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/scripts/updateVersionCodeForSnapshot.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
latest_tag=$LATEST_OTHER_TAG
4+
35
# 最新tag,例如:v1.0.0
46
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
57
echo ">>>latest tag: $latest_tag"

.github/workflows/debug.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,19 @@ jobs:
7575
- name: Setup NDK
7676
# if: steps.ndk-cache.outputs.cache-hit != 'true'
7777
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;22.0.7026061"
78+
- name: Fix App Version
79+
run: |
80+
rb=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
81+
rc=$(git rev-parse --short HEAD)
82+
video_tag=$(git describe --tags --match "*video*" --abbrev=0 HEAD)
83+
other_tag=$(git describe --tags --match "v[0-9].[0-9].[0-9]" --abbrev=0 HEAD)
84+
echo "latest_video_tag=$video_tag" >> $GITHUB_ENV
85+
echo "latest_other_tag=$other_tag" >> $GITHUB_ENV
7886
- name: Update SDK Version
79-
run: bash .github/scripts/updateVersionCodeForSnapshot.sh
87+
run: |
88+
export LATEST_VIDEO_TAG=${{env.latest_video_tag}}
89+
export LATEST_OTHER_TAG=${{env.latest_other_tag}}
90+
bash .github/scripts/updateVersionCodeForSnapshot.sh
8091
# - name: Test with Gradle
8192
# run: ./gradlew test
8293
- name: Build with Gradle

0 commit comments

Comments
 (0)