Skip to content

Commit 885fdef

Browse files
Changed: Move to semantic versioning for app and library versions and add commit hash and github to APK file names
The `versionName` will now follow semantic version `2.0.0` spec in the format `major.minor.patch(-prerelease)(+buildmetadata)`. This will make versioning the prerelease and github debug builds versions easier and follow a spec. The @termux devs should make sure that when bumping `versionName` in `build.gradle` files and when creating a tag for new releases on github that they include the patch number as well, like `v0.1.0` instead of just `v0.1`. The `build.gradle` files and `attach_debug_apks_to_release` workflow will now validate the version as well and the build/attachment will fail if `versionName` does not follow the spec. https://semver.org/spec/v2.0.0.html APKs released on github for debug build workflows and releases are now referred as `Github` releases as per 7b10a35 and 94e01d6, so APK filenames have been modified to include `github` in the filename. The APKs are still debuggable, so that tag remains too. For github workflows the apk filename format will be `termux-app_<current_version>+<last_commit_hash>-github-debug_<arch>.apk`, like `termux-app_v0.1.0+xxxxxxxx-github-debug_arm64-v8a.apk` and for github releases it will be `termux-app_<release_version>+github-debug_<arch>.apk`, like `termux-app_v0.1+github-debug_arm64-v8a.apk`. The `last_commit_hash` will be the first `8` characters of the commit hash. The `<last_commit_hash>-github-debug` will act as `buildmetadata` and will not affect versioning precedence. For github workflows triggered by `push` and `pull_request` triggers, `<current_version>+<last_commit_hash>` will be used as new `versionName`, like `v0.1.0+xxxxxxxx`. This will make tracking which build a user is using easier and help in resolving issues as well. Note that users using github releases and termux devs using `$TERMUX_VERSION` environment variables in scripts should take commit hash into consideration and possibly use something like `dpkg --compare-versions "$TERMUX_VERSION" ge 0.1` where appropriate instead of mathematical comparisons. The `app/build.gradle` now also supports following `TERMUX_` scoped environmental variables and `RELEASE_TAG` variable will not be used anymore since it may conflict with possibly other variables used by users. They will also allow enabling split APKs for both debug and release builds. - `TERMUX_APP_VERSION_NAME` will be used as `versionName` if its set. - `TERMUX_APK_VERSION_TAG` will be used as `termux-app_<TERMUX_APK_VERSION_TAG>_<arch>.apk` if its set. The `_<arch>` will only exist for split APKs. - `TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS` will define whether split APKs should be enabled for debug builds. Default value is `1`. - `TERMUX_SPLIT_APKS_FOR_RELEASE_BUILDS` will define whether split APKs should be enabled for release builds. Default value is `0` since F-Droid does not support split APKs, check termux#1904. So based on above, if in future github releases are to be converted to `release` builds instead of `debug` builds, something like following can be done and even a workflow can be created for it. Users can also build split APKs release builds for themselves if they want. ``` export TERMUX_SPLIT_APKS_FOR_RELEASE_BUILDS=1 ./gradlew assembleRelease -Pandroid.injected.signing.store.file="$(pwd)/app/dev_keystore.jks" -Pandroid.injected.signing.store.password=xrj45yWGLbsO7W0v -Pandroid.injected.signing.key.alias=alias -Pandroid.injected.signing.key.password=xrj45yWGLbsO7W0v ``` The APK will be found at `./app/build/outputs/apk/release/termux-app_<version>_<arch>.apk` The `TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS` can be set to `0` to disable building split APKs which may be helpful for users building termux on device considering they will extra space and build time. Instructions for building are at termux/termux-packages#7227 (comment). ``` export TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS=0 ./gradlew assembleDebug ``` The APK will be found at `./app/build/outputs/apk/debug/termux-app_debug_universal.apk` Note that F-Droid uses algorithm at https://gitlab.com/fdroid/fdroidserver/-/blob/2.1a0/fdroidserver/build.py#L746 to automatically detect built APKs, so ensure any modifications to location or file name are compliant. Current updates should be. Auto updates are detected by checkupdates bot at https://gitlab.com/fdroid/fdroidserver/-/blob/master/fdroidserver/checkupdates.py
1 parent 736150b commit 885fdef

File tree

4 files changed

+188
-77
lines changed

4 files changed

+188
-77
lines changed

.github/workflows/attach_debug_apks_to_release.yml

+60-20
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,71 @@ on:
66
- published
77

88
jobs:
9-
build:
9+
attach-apks:
1010
runs-on: ubuntu-latest
1111
env:
1212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1313
steps:
14-
- name: Set tag
15-
id: vars
16-
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
1714
- name: Clone repository
1815
uses: actions/checkout@v2
1916
with:
2017
ref: ${{ env.GITHUB_REF }}
21-
- name: Build
22-
env:
23-
RELEASE_TAG: ${{ steps.vars.outputs.tag }}
24-
run: ./gradlew assembleDebug
25-
- name: Attach debug APKs to release
26-
env:
27-
RELEASE_TAG: ${{ steps.vars.outputs.tag }}
28-
run: >-
29-
hub release edit
30-
-m ""
31-
-a ./app/build/outputs/apk/debug/termux-app-universal-$RELEASE_TAG-debug.apk
32-
-a ./app/build/outputs/apk/debug/termux-app-arm64-v8a-$RELEASE_TAG-debug.apk
33-
-a ./app/build/outputs/apk/debug/termux-app-armeabi-v7a-$RELEASE_TAG-debug.apk
34-
-a ./app/build/outputs/apk/debug/termux-app-x86_64-$RELEASE_TAG-debug.apk
35-
-a ./app/build/outputs/apk/debug/termux-app-x86-$RELEASE_TAG-debug.apk
36-
$RELEASE_TAG
18+
19+
- name: Build and attach APKs to release
20+
shell: bash {0}
21+
run: |
22+
exit_on_error() {
23+
echo "$1"
24+
echo "Deleting '$RELEASE_VERSION_NAME' release and '$GITHUB_REF' tag"
25+
hub release delete "$RELEASE_VERSION_NAME"
26+
git push --delete origin "$GITHUB_REF"
27+
exit 1
28+
}
29+
30+
echo "Setting vars"
31+
RELEASE_VERSION_NAME="${GITHUB_REF/refs\/tags\//}"
32+
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
33+
exit_on_error "The versionName '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html."
34+
fi
35+
36+
APK_DIR_PATH="./app/build/outputs/apk/debug"
37+
APK_VERSION_TAG="$RELEASE_VERSION_NAME+github-debug"
38+
APK_BASENAME_PREFIX="termux-app_$APK_VERSION_TAG"
39+
40+
echo "Building APKs for '$RELEASE_VERSION_NAME' release"
41+
export TERMUX_APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle
42+
if ! ./gradlew assembleDebug; then
43+
exit_on_error "Build failed for '$RELEASE_VERSION_NAME' release."
44+
fi
45+
46+
echo "Validating APKs"
47+
for abi in universal arm64-v8a armeabi-v7a x86_64 x86; do
48+
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk"; then
49+
files_found="$(ls "$APK_DIR_PATH")"
50+
exit_on_error "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk'. Files found: "$'\n'"$files_found"
51+
fi
52+
done
53+
54+
echo "Generating sha25sums file"
55+
if ! (cd "$APK_DIR_PATH"; sha256sum \
56+
"${APK_BASENAME_PREFIX}_universal.apk" \
57+
"${APK_BASENAME_PREFIX}_arm64-v8a.apk" \
58+
"${APK_BASENAME_PREFIX}_armeabi-v7a.apk" \
59+
"${APK_BASENAME_PREFIX}_x86_64.apk" \
60+
"${APK_BASENAME_PREFIX}_x86.apk" \
61+
> sha256sums); then
62+
exit_on_error "Generate sha25sums failed for '$RELEASE_VERSION_NAME' release."
63+
fi
64+
65+
echo "Attaching APKs to github release"
66+
if ! hub release edit \
67+
-m "" \
68+
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_universal.apk" \
69+
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_arm64-v8a.apk" \
70+
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_armeabi-v7a.apk" \
71+
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_x86_64.apk" \
72+
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_x86.apk" \
73+
-a "$APK_DIR_PATH/sha256sums" \
74+
"$RELEASE_VERSION_NAME"; then
75+
exit_on_error "Attach APKs to release failed for '$RELEASE_VERSION_NAME' release."
76+
fi

.github/workflows/debug_build.yml

+99-42
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,110 @@ on:
44
push:
55
branches:
66
- master
7-
- android-10
87
pull_request:
98
branches:
109
- master
11-
- android-10
1210

1311
jobs:
1412
build:
1513
runs-on: ubuntu-latest
1614
steps:
17-
- name: Clone repository
18-
uses: actions/checkout@v2
19-
- name: Build
20-
run: |
21-
./gradlew assembleDebug
22-
- name: Store generated universal APK file
23-
uses: actions/upload-artifact@v2
24-
with:
25-
name: termux-app-universal
26-
path: |
27-
./app/build/outputs/apk/debug/termux-app-universal-debug.apk
28-
./app/build/outputs/apk/debug/output-metadata.json
29-
- name: Store generated arm64-v8a APK file
30-
uses: actions/upload-artifact@v2
31-
with:
32-
name: termux-app-arm64-v8a
33-
path: |
34-
./app/build/outputs/apk/debug/termux-app-arm64-v8a-debug.apk
35-
./app/build/outputs/apk/debug/output-metadata.json
36-
- name: Store generated armeabi-v7a APK file
37-
uses: actions/upload-artifact@v2
38-
with:
39-
name: termux-app-armeabi-v7a
40-
path: |
41-
./app/build/outputs/apk/debug/termux-app-armeabi-v7a-debug.apk
42-
./app/build/outputs/apk/debug/output-metadata.json
43-
- name: Store generated x86_64 APK file
44-
uses: actions/upload-artifact@v2
45-
with:
46-
name: termux-app-x86_64
47-
path: |
48-
./app/build/outputs/apk/debug/termux-app-x86_64-debug.apk
49-
./app/build/outputs/apk/debug/output-metadata.json
50-
- name: Store generated x86 APK file
51-
uses: actions/upload-artifact@v2
52-
with:
53-
name: termux-app-x86
54-
path: |
55-
./app/build/outputs/apk/debug/termux-app-x86-debug.apk
56-
./app/build/outputs/apk/debug/output-metadata.json
15+
- name: Clone repository
16+
uses: actions/checkout@v2
17+
18+
- name: Build APKs
19+
shell: bash {0}
20+
run: |
21+
exit_on_error() { echo "$1"; exit 1; }
22+
23+
echo "Setting vars"
24+
# Set RELEASE_VERSION_NAME to "<CURRENT_VERSION_NAME>+<last_commit_hash>"
25+
CURRENT_VERSION_NAME_REGEX='\s+versionName "([^"]+)"$'
26+
CURRENT_VERSION_NAME="$(grep -m 1 -E "$CURRENT_VERSION_NAME_REGEX" ./app/build.gradle | sed -r "s/$CURRENT_VERSION_NAME_REGEX/\1/")"
27+
RELEASE_VERSION_NAME="v$CURRENT_VERSION_NAME+${GITHUB_SHA:0:7}" # The "+" is necessary so that versioning precedence is not affected
28+
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
29+
exit_on_error "The versionName '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html."
30+
fi
31+
32+
APK_DIR_PATH="./app/build/outputs/apk/debug"
33+
APK_VERSION_TAG="$RELEASE_VERSION_NAME-github-debug" # Note the "-", GITHUB_SHA will already have "+" before it
34+
APK_BASENAME_PREFIX="termux-app_$APK_VERSION_TAG"
35+
36+
# Used by attachment steps later
37+
echo "APK_DIR_PATH=$APK_DIR_PATH" >> $GITHUB_ENV
38+
echo "APK_VERSION_TAG=$APK_VERSION_TAG" >> $GITHUB_ENV
39+
echo "APK_BASENAME_PREFIX=$APK_BASENAME_PREFIX" >> $GITHUB_ENV
40+
41+
echo "Building APKs for '$RELEASE_VERSION_NAME' build"
42+
export TERMUX_APP_VERSION_NAME="${RELEASE_VERSION_NAME/v/}" # Used by app/build.gradle
43+
export TERMUX_APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle
44+
if ! ./gradlew assembleDebug; then
45+
exit_on_error "Build failed for '$RELEASE_VERSION_NAME' build."
46+
fi
47+
48+
echo "Validating APKs"
49+
for abi in universal arm64-v8a armeabi-v7a x86_64 x86; do
50+
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk"; then
51+
files_found="$(ls "$APK_DIR_PATH")"
52+
exit_on_error "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk'. Files found: "$'\n'"$files_found"
53+
fi
54+
done
55+
56+
echo "Generating sha25sums file"
57+
if ! (cd "$APK_DIR_PATH"; sha256sum \
58+
"${APK_BASENAME_PREFIX}_universal.apk" \
59+
"${APK_BASENAME_PREFIX}_arm64-v8a.apk" \
60+
"${APK_BASENAME_PREFIX}_armeabi-v7a.apk" \
61+
"${APK_BASENAME_PREFIX}_x86_64.apk" \
62+
"${APK_BASENAME_PREFIX}_x86.apk" \
63+
> sha256sums); then
64+
exit_on_error "Generate sha25sums failed for '$RELEASE_VERSION_NAME' release."
65+
fi
66+
67+
- name: Attach universal APK file
68+
uses: actions/upload-artifact@v2
69+
with:
70+
name: ${{ env.APK_BASENAME_PREFIX }}_universal
71+
path: |
72+
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_universal.apk
73+
${{ env.APK_DIR_PATH }}/output-metadata.json
74+
75+
- name: Attach arm64-v8a APK file
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: ${{ env.APK_BASENAME_PREFIX }}_arm64-v8a
79+
path: |
80+
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_arm64-v8a.apk
81+
${{ env.APK_DIR_PATH }}/output-metadata.json
82+
83+
- name: Attach armeabi-v7a APK file
84+
uses: actions/upload-artifact@v2
85+
with:
86+
name: ${{ env.APK_BASENAME_PREFIX }}_armeabi-v7a
87+
path: |
88+
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_armeabi-v7a.apk
89+
${{ env.APK_DIR_PATH }}/output-metadata.json
90+
91+
- name: Attach x86_64 APK file
92+
uses: actions/upload-artifact@v2
93+
with:
94+
name: ${{ env.APK_BASENAME_PREFIX }}_x86_64
95+
path: |
96+
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_x86_64.apk
97+
${{ env.APK_DIR_PATH }}/output-metadata.json
98+
99+
- name: Attach x86 APK file
100+
uses: actions/upload-artifact@v2
101+
with:
102+
name: ${{ env.APK_BASENAME_PREFIX }}_x86
103+
path: |
104+
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_x86.apk
105+
${{ env.APK_DIR_PATH }}/output-metadata.json
106+
107+
- name: Attach sha256sums file
108+
uses: actions/upload-artifact@v2
109+
with:
110+
name: sha256sums
111+
path: |
112+
${{ env.APK_DIR_PATH }}/sha256sums
113+
${{ env.APK_DIR_PATH }}/output-metadata.json

.github/workflows/trigger_library_builds_on_jitpack.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,16 @@ on:
66
- published
77

88
jobs:
9-
build:
9+
trigger-termux-library-builds:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Set tag
13-
id: vars
14-
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\/v/}
15-
- name: Echo tag
16-
run: echo "Triggering termux library builds on jitpack for '${{ steps.vars.outputs.tag }}' after waiting for 3 mins"
12+
- name: Set vars
13+
run: echo "TERMUX_LIB_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV # Do not include "v" prefix
14+
- name: Echo release
15+
run: echo "Triggering termux library builds on jitpack for '$TERMUX_LIB_VERSION' release after waiting for 3 mins"
1716
- name: Trigger termux library builds on jitpack
18-
env:
19-
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
2017
run: |
2118
sleep 180 # It will take some time for the new tag to be detected by Jitpack
22-
curl --max-time 600 --no-progress-meter https://jitpack.io/com/termux/termux-app/terminal-emulator/$RELEASE_VERSION/terminal-emulator-$RELEASE_VERSION.pom
23-
curl --max-time 600 --no-progress-meter https://jitpack.io/com/termux/termux-app/terminal-view/$RELEASE_VERSION/terminal-view-$RELEASE_VERSION.pom
24-
curl --max-time 600 --no-progress-meter https://jitpack.io/com/termux/termux-app/termux-shared/$RELEASE_VERSION/termux-shared-$RELEASE_VERSION.pom
19+
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/terminal-emulator/$TERMUX_LIB_VERSION/terminal-emulator-$TERMUX_LIB_VERSION.pom"
20+
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/terminal-view/$TERMUX_LIB_VERSION/terminal-view-$TERMUX_LIB_VERSION.pom"
21+
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/termux-shared/$TERMUX_LIB_VERSION/termux-shared-$TERMUX_LIB_VERSION.pom"

app/build.gradle

+21-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ plugins {
55
android {
66
compileSdkVersion project.properties.compileSdkVersion.toInteger()
77
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion
8+
def appVersionName = System.getenv("TERMUX_APP_VERSION_NAME") ?: ""
9+
def apkVersionTag = System.getenv("TERMUX_APK_VERSION_TAG") ?: ""
10+
def splitAPKsForDebugBuilds = System.getenv("TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS") ?: "1"
11+
def splitAPKsForReleaseBuilds = System.getenv("TERMUX_SPLIT_APKS_FOR_RELEASE_BUILDS") ?: "0" // F-Droid does not support split APKs #1904
812

913
dependencies {
1014
implementation "androidx.annotation:annotation:1.2.0"
@@ -27,7 +31,10 @@ android {
2731
minSdkVersion project.properties.minSdkVersion.toInteger()
2832
targetSdkVersion project.properties.targetSdkVersion.toInteger()
2933
versionCode 117
30-
versionName "0.117"
34+
versionName "0.117.0"
35+
36+
if (appVersionName) versionName = appVersionName
37+
validateVersionName(versionName)
3138

3239
manifestPlaceholders.TERMUX_PACKAGE_NAME = "com.termux"
3340
manifestPlaceholders.TERMUX_APP_NAME = "Termux"
@@ -46,7 +53,8 @@ android {
4653

4754
splits {
4855
abi {
49-
enable gradle.startParameter.taskNames.any { it.contains("Debug") }
56+
enable ((gradle.startParameter.taskNames.any { it.contains("Debug") } && splitAPKsForDebugBuilds == "1") ||
57+
(gradle.startParameter.taskNames.any { it.contains("Release") } && splitAPKsForReleaseBuilds == "1"))
5058
reset ()
5159
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
5260
universalApk true
@@ -106,8 +114,10 @@ android {
106114
variant.outputs.all { output ->
107115
if (variant.buildType.name == "debug") {
108116
def abi = output.getFilter(com.android.build.OutputFile.ABI)
109-
def releaseTag = System.getenv("RELEASE_TAG")
110-
outputFileName = new File("termux-app-" + (abi ? abi : "universal") + (releaseTag ? "-" + releaseTag : "") + "-debug.apk")
117+
outputFileName = new File("termux-app_" + (apkVersionTag ? apkVersionTag : "debug") + "_" + (abi ? abi : "universal") + ".apk")
118+
} else if (variant.buildType.name == "release") {
119+
def abi = output.getFilter(com.android.build.OutputFile.ABI)
120+
outputFileName = new File("termux-app_" + (apkVersionTag ? apkVersionTag : "release") + "_" + (abi ? abi : "universal") + ".apk")
111121
}
112122
}
113123
}
@@ -125,6 +135,13 @@ task versionName {
125135
}
126136
}
127137

138+
def validateVersionName(String versionName) {
139+
// https://semver.org/spec/v2.0.0.html#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
140+
// ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
141+
if (!java.util.regex.Pattern.matches("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\$", versionName))
142+
throw new GradleException("The versionName '" + versionName + "' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html.")
143+
}
144+
128145
def downloadBootstrap(String arch, String expectedChecksum, String version) {
129146
def digest = java.security.MessageDigest.getInstance("SHA-256")
130147

0 commit comments

Comments
 (0)