File tree 2 files changed +26
-8
lines changed
2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 5
5
token :
6
6
description : " GitHub token"
7
7
required : false
8
+ downloadDevelopmentRelease :
9
+ description : " Downloads the latest development version when 'true'; by default, the latest released version is downloaded"
10
+ default : " false"
11
+ required : false
8
12
9
13
runs :
10
14
using : " composite"
@@ -19,12 +23,17 @@ runs:
19
23
curlOpts+=(--header 'Authorization: Bearer ${{ inputs.token }}')
20
24
fi
21
25
22
- # Get the download url of the latest release
23
- downloadUrl=$(curl "${curlOpts[@]}" https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep develocity-gradle)
26
+ releaseUrl="https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest"
27
+ if [ "${{ inputs.downloadDevelopmentRelease }}" == "true" ]; then
28
+ releaseUrl="https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/tags/development-latest"
29
+ fi
30
+
31
+ # Get the download url of the latest development or released version
32
+ downloadUrl=$(curl "${curlOpts[@]}" "$releaseUrl" | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep develocity-gradle)
24
33
25
- # Download the latest version of the build validation scripts
34
+ # Download the scripts
26
35
curl "${curlOpts[@]}" --output develocity-gradle-build-validation.zip $downloadUrl
27
36
28
- # Unzip the downloaded build validation scripts
37
+ # Unzip the downloaded scripts
29
38
unzip -q -o develocity-gradle-build-validation.zip
30
39
shell : bash
Original file line number Diff line number Diff line change 5
5
token :
6
6
description : " GitHub token"
7
7
required : false
8
+ downloadDevelopmentRelease :
9
+ description : " Downloads the latest development version when 'true'; by default, the latest released version is downloaded"
10
+ default : " false"
11
+ required : false
8
12
9
13
runs :
10
14
using : " composite"
@@ -19,12 +23,17 @@ runs:
19
23
curlOpts+=(--header 'Authorization: Bearer ${{ inputs.token }}')
20
24
fi
21
25
22
- # Get the download url of the latest release
23
- downloadUrl=$(curl "${curlOpts[@]}" https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep develocity-maven)
26
+ releaseUrl="https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest"
27
+ if [ "${{ inputs.downloadDevelopmentRelease }}" == "true" ]; then
28
+ releaseUrl="https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/tags/development-latest"
29
+ fi
30
+
31
+ # Get the download url of the latest development or released version
32
+ downloadUrl=$(curl "${curlOpts[@]}" "$releaseUrl" | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep develocity-maven)
24
33
25
- # Download the latest version of the build validation scripts
34
+ # Download the scripts
26
35
curl "${curlOpts[@]}" --output develocity-maven-build-validation.zip $downloadUrl
27
36
28
- # Unzip the downloaded build validation scripts
37
+ # Unzip the downloaded scripts
29
38
unzip -q -o develocity-maven-build-validation.zip
30
39
shell : bash
You can’t perform that action at this time.
0 commit comments