Last active
March 20, 2021 19:05
-
-
Save mageddo/cd78546c249ca796c7a847b0dbfa3a3d to your computer and use it in GitHub Desktop.
Gradle Release Config Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'net.researchgate.release' version '2.8.1' | |
} | |
release { | |
project.ext.set("release.useAutomaticVersion", true) | |
git { | |
requireBranch = '' | |
} | |
failOnCommitNeeded = false | |
failOnPublishNeeded = false | |
failOnUnversionedFiles = false | |
buildTasks = [] | |
} | |
// se quiser que fique com o numero da nova versao | |
updateVersion.doLast { | |
def f = file("${project.projectDir}/docker-compose.yml") | |
f.text = f.text.replaceAll("(:\\ )*\\d+\\.\\d+\\.\\d+", "\$1${version}") | |
} | |
// se quiser que fique com o numero da versao que foi gerada release | |
confirmReleaseVersion.doLast { | |
def f = file("${project.projectDir}/docker-compose.yml") | |
f.text = f.text.replaceAll("(:\\ )*\\d+\\.\\d+\\.\\d+", "\$1${version}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment