File tree 4 files changed +28
-18
lines changed
4 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,20 @@ jobs:
61
61
udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
62
62
https://github.com/RandomCoderOrg/ubuntu-on-android \
63
63
| 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
72
78
73
79
- name : 📝 Generate Release Notes
74
80
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:
68
68
udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
69
69
https://github.com/RandomCoderOrg/ubuntu-on-android \
70
70
| 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
79
85
80
86
- name : 📝 Generate Release Notes
81
87
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