File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
# Find the version files in this directory or its descendants, but don't recurse too deep.
22
22
# This line must be kept in sync with "bump-version.set.sh".
23
- VERSFILES=$( find . -maxdepth 3 ! -path ./.git/\* | grep -v /node_modules/ | grep -E ' .*/(version|Cargo.toml|version.go|package.json|pom.xml|version.sbt)$' )
23
+ VERSFILES=$( find . -maxdepth 3 ! -path ./.git/\* | grep -v /node_modules/ | grep -E ' .*/(version|Cargo.toml|version.go|package.json|pom.xml|version.sbt|build.gradle.kts )$' )
24
24
25
25
# Do we have at least one?
26
26
if [ -z " ${VERSFILES} " ] ; then
@@ -72,6 +72,9 @@ for FILE in ${VERSFILES} ; do
72
72
version.sbt)
73
73
VERS=$( sed -e ' s/^[^"]*"//' -e ' s/"$//' < " ${FILE} " )
74
74
;;
75
+ build.gradle.kts)
76
+ VERS=$( grep " ^version.*=" < " ${FILE} " | sed -e ' s/^[^"]*"//' -e ' s/"$//' )
77
+ ;;
75
78
* )
76
79
echo " Can't parse '${FILE} ' for version" 1>&2
77
80
exit 1
Original file line number Diff line number Diff line change 35
35
36
36
# Find the version files in this directory or its descendants, but don't recurse too deep.
37
37
# This line must be kept in sync with "bump-version.get.sh".
38
- VERSFILES=$( find . -maxdepth 3 ! -path ./.git/\* | grep -v /node_modules/ | grep -E ' .*/(version|Cargo.toml|version.go|package.json|pom.xml|version.sbt)$' )
38
+ VERSFILES=$( find . -maxdepth 3 ! -path ./.git/\* | grep -v /node_modules/ | grep -E ' .*/(version|Cargo.toml|version.go|package.json|pom.xml|version.sbt|build.gradle.kts )$' )
39
39
40
40
# Edit the version files.
41
41
for FILE in ${VERSFILES} ; do
@@ -100,6 +100,13 @@ for FILE in ${VERSFILES} ; do
100
100
rm " ${FILE} .tmp"
101
101
;;
102
102
103
+ build.gradle.kts)
104
+ # Replace -foo with -SNAPSHOT to be compatible with Java conventions.
105
+ JAVAVERS=" ${NEWVERS/ -*/ -SNAPSHOT} "
106
+ sed ' s/^version = ".*"$/version = "' " ${JAVAVERS} " ' "/' " ${FILE} " > " ${FILE} .tmp"
107
+ mv " ${FILE} .tmp" " ${FILE} "
108
+ ;;
109
+
103
110
* )
104
111
echo " Can't edit '${FILE} ' with new version" 1>&2
105
112
exit 1
You can’t perform that action at this time.
0 commit comments