File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 55 token :
66 description : " GitHub token"
77 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
812
913runs :
1014 using : " composite"
@@ -19,12 +23,17 @@ runs:
1923 curlOpts+=(--header 'Authorization: Bearer ${{ inputs.token }}')
2024 fi
2125
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)
2433
25- # Download the latest version of the build validation scripts
34+ # Download the scripts
2635 curl "${curlOpts[@]}" --output develocity-gradle-build-validation.zip $downloadUrl
2736
28- # Unzip the downloaded build validation scripts
37+ # Unzip the downloaded scripts
2938 unzip -q -o develocity-gradle-build-validation.zip
3039 shell : bash
Original file line number Diff line number Diff line change 55 token :
66 description : " GitHub token"
77 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
812
913runs :
1014 using : " composite"
@@ -19,12 +23,17 @@ runs:
1923 curlOpts+=(--header 'Authorization: Bearer ${{ inputs.token }}')
2024 fi
2125
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)
2433
25- # Download the latest version of the build validation scripts
34+ # Download the scripts
2635 curl "${curlOpts[@]}" --output develocity-maven-build-validation.zip $downloadUrl
2736
28- # Unzip the downloaded build validation scripts
37+ # Unzip the downloaded scripts
2938 unzip -q -o develocity-maven-build-validation.zip
3039 shell : bash
You can’t perform that action at this time.
0 commit comments