Skip to content

Commit

Permalink
support rc-versions in publish.gradle
Browse files Browse the repository at this point in the history
The latest release version gets parsed from the README.md file. So far it was always expected to consist of the major.minor.patch format without any suffixes. Now that the latest release version is `1.0.0-rc1` this crashes. I extended the parsing to allow suffixes, since this seems to be a valid use case in general.

Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
  • Loading branch information
codecholeric committed Oct 3, 2022
1 parent a7a71b1 commit 651f3f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-steps/release/publish.gradle
Expand Up @@ -19,7 +19,7 @@ initializeSonatypeStagingRepository.doFirst {
task publishArchUnit(dependsOn: [closeSonatypeStagingRepository, releaseSonatypeStagingRepository])

def getLastReleaseVersion() {
(new File(project.rootDir, 'README.md').text =~ /testImplementation 'com.tngtech.archunit:archunit:(\d+.\d+.\d+)'/).findAll().first()[1]
(new File(project.rootDir, 'README.md').text =~ /testImplementation 'com.tngtech.archunit:archunit:(\d+.\d+.\d+.*)'/).findAll().first()[1]
}

def gradleProperties = new File(project.rootDir, 'gradle.properties')
Expand Down

0 comments on commit 651f3f7

Please sign in to comment.