File tree Expand file tree Collapse file tree 4 files changed +28
-18
lines changed
Expand file tree Collapse file tree 4 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,20 @@ jobs:
6161 udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
6262 https://github.com/RandomCoderOrg/ubuntu-on-android \
6363 | tail -n1 | cut -d / -f 3 | cut -d v -f 2- )
64-
65- udroid_download=$(
66- git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
67- https://github.com/RandomCoderOrg/udroid-download \
68- | tail -n1 | cut -d / -f 3
69- )
70-
71- echo "VERSIONTAG=V${udroid_version}${BUILD_TYPE}R$((${udroid_download: -2} + 1))" >> $GITHUB_ENV
64+
65+ latest_tag=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
66+ https://github.com/RandomCoderOrg/udroid-download \
67+ | tail -n1 | cut -d / -f 3)
68+
69+ if [[ $latest_tag =~ R([0-9]+)$ ]]; then
70+ current_release=${BASH_REMATCH[1]}
71+ else
72+ current_release=0
73+ fi
74+
75+ next_release=$((current_release + 1))
76+
77+ echo "VERSIONTAG=V${udroid_version}ABR${next_release}" >> $GITHUB_ENV
7278
7379 - name : 📝 Generate Release Notes
7480 run : sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change @@ -68,14 +68,20 @@ jobs:
6868 udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
6969 https://github.com/RandomCoderOrg/ubuntu-on-android \
7070 | tail -n1 | cut -d / -f 3 | cut -d v -f 2- )
71-
72- udroid_download=$(
73- git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
74- https://github.com/RandomCoderOrg/udroid-download \
75- | tail -n1 | cut -d / -f 3
76- )
77-
78- echo "VERSIONTAG=V${udroid_version}${BUILD_TYPE}R$((${udroid_download: -2} + 1))" >> $GITHUB_ENV
71+
72+ latest_tag=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
73+ https://github.com/RandomCoderOrg/udroid-download \
74+ | tail -n1 | cut -d / -f 3)
75+
76+ if [[ $latest_tag =~ R([0-9]+)$ ]]; then
77+ current_release=${BASH_REMATCH[1]}
78+ else
79+ current_release=0
80+ fi
81+
82+ next_release=$((current_release + 1))
83+
84+ echo "VERSIONTAG=V${udroid_version}ABR${next_release}" >> $GITHUB_ENV
7985
8086 - name : 📝 Generate Release Notes
8187 run : sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments