File tree Expand file tree Collapse file tree 2 files changed +48
-8
lines changed Expand file tree Collapse file tree 2 files changed +48
-8
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,10 @@ jobs:
20
20
api_token : ${{ secrets.CI_DEPLOY_KEY }}
21
21
22
22
gradle-wrapper :
23
- runs-on : ubuntu-latest
24
- steps :
25
- - uses : actions/checkout@v3
26
-
27
- - uses : gradle-update/update-gradle-wrapper-action@981c551b17dbcf1940b1b4435afdb79babb7c13a
28
- with :
29
- repo-token : ${{ secrets.CI_DEPLOY_KEY }}
30
- labels : dependencies
23
+ uses : getsentry/github-workflows/.github/workflows/updater.yml@v1
24
+ with :
25
+ path : scripts/update-gradle.sh
26
+ name : Gradle
27
+ pattern : ' ^v[0-9.]+$' # only match non-preview versions
28
+ secrets :
29
+ api_token : ${{ secrets.CI_DEPLOY_KEY }}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ cd $( dirname " $0 " ) /../
5
+
6
+ case $1 in
7
+ get-version)
8
+ # `./gradlew` shows some info on the first run, breaking the parsing in the next step.
9
+ # Therefore, we run it once without checking any output.
10
+ ./gradlew --version > /dev/null
11
+ version=" $( ./gradlew --version | sed -E -n ' s/.*Gradle +([0-9.]+).*/\1/p' ) "
12
+ echo " v$version "
13
+ ;;
14
+ get-repo)
15
+ echo " https://github.com/gradle/gradle.git"
16
+ ;;
17
+ set-version)
18
+ version=$2
19
+
20
+ # Remove leading "v"
21
+ if [[ " $version " == v* ]]; then
22
+ version=" ${version: 1} "
23
+ fi
24
+
25
+ # Remove trailing ".0" - gradlew expects '7.1' instead of '7.1.0'
26
+ if [[ " $version " == * " .0" ]]; then
27
+ version=" ${version: 0: ${# version} -2} "
28
+ fi
29
+ echo " Setting gradle version to '$version '"
30
+
31
+ # This sets version to gradle-wrapper.properties.
32
+ ./gradlew wrapper --gradle-version " $version "
33
+
34
+ # Verify it works.
35
+ ./gradlew --version
36
+ ;;
37
+ * )
38
+ echo " Unknown argument $1 "
39
+ exit 1
40
+ ;;
41
+ esac
You can’t perform that action at this time.
0 commit comments