diff --git a/README.md b/README.md index ec498178..11738346 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To preview the latest work in progress builds, add the following SNAPSHOT depend ```groovy dependencies { - implementation 'com.braintreepayments.api:browser-switch:2.6.2-SNAPSHOT' + implementation 'com.braintreepayments.api:browser-switch:3.0.0-beta1-SNAPSHOT' } ``` diff --git a/build.gradle b/build.gradle index c0e10d3e..a8f9ed91 100644 --- a/build.gradle +++ b/build.gradle @@ -85,16 +85,15 @@ task changeGradleReleaseVersion { task changeREADMEVersion { doLast { - def readmeFile = new File('README.md') - def readmeFileText = readmeFile.text.replaceFirst(":browser-switch:\\d+\\.\\d+\\.\\d+'", ":browser-switch:" + versionParam + "'") + def readmeFileText = readmeFile.text.replaceFirst(":browser-switch:\\d+\\.\\d+\\.\\d+(-.*)?'", ":browser-switch:" + versionParam + "'") readmeFile.write(readmeFileText) } } task changeMigrationGuideVersion { doLast { - def migrationGuideFile = new File('v2_MIGRATION.md') + def migrationGuideFile = new File('v3_MIGRATION.md') def migrationGuideFileText = migrationGuideFile.text.replaceAll(":\\d+\\.\\d+\\.\\d+(-.*)?'", ":" + versionParam + "'") migrationGuideFile.write(migrationGuideFileText) } @@ -112,8 +111,10 @@ task incrementSNAPSHOTVersion { doLast { def gradleFile = new File('build.gradle') def (major, minor, patch) = versionParam.tokenize('.') - def patchInteger = patch.toInteger() - def newVersion = "$major.$minor.${patchInteger + 1}-SNAPSHOT" + def patchInteger = patch[-1].toInteger() + patchInteger++ + def newPatch = patch.substring(0,patch.length()-1) + patchInteger.toString() + def newVersion = "$major.$minor.$newPatch-SNAPSHOT" def gradleFileText = gradleFile.text.replaceFirst("\\nversion = '\\d+\\.\\d+\\.\\d+(-.*)?'", "\nversion = '" + newVersion + "'") gradleFile.write(gradleFileText)