Skip to content

Instantly share code, notes, and snippets.

@mageddo
Last active March 20, 2021 19:05
Embed
What would you like to do?
Gradle Release Config Example
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