Skip to content

Commit 231beef

Browse files
authored
Remove rc version suffix from build version. (#211)
1 parent d114382 commit 231beef

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

build.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -983,19 +983,7 @@ String getVersionFromFile() {
983983

984984
String getProjectVersion() {
985985
if (versionFileExists()) {
986-
String version = getVersionFromFile()
987-
// If version is in 900+ series, treat it as a pre-release
988-
Pattern pattern = Pattern.compile("^([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?\$")
989-
Matcher matcher = pattern.matcher(version)
990-
if (matcher.matches()) {
991-
int lastNum = Integer.valueOf(matcher.group(4))
992-
if (lastNum >= 900) {
993-
// Convert 1.2.0.900+ to 1.2.0.0-rcX format
994-
int rcNum = lastNum - 899
995-
return matcher.group(1) + "." + matcher.group(2) + "." + matcher.group(3) + ".0-rc" + rcNum
996-
}
997-
}
998-
return version
986+
return getVersionFromFile()
999987
}
1000988

1001989
try {

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.2.0-rc1
1+
1.5.2.1

0 commit comments

Comments
 (0)