Skip to content

Instantly share code, notes, and snippets.

@mageddo
Last active March 20, 2021 19:05
Show Gist options
  • Save mageddo/cd78546c249ca796c7a847b0dbfa3a3d to your computer and use it in GitHub Desktop.
Save mageddo/cd78546c249ca796c7a847b0dbfa3a3d to your computer and use it in GitHub Desktop.
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