You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea I had until now was to add a new task that ensure that version == lastVersion during a release:
release {
buildTasks = ['doRelease']
}
task doRelease {
dependsOn(
'checkLastVersionValue',
// other release tasks
)
}
task checkLastVersionValue {
doLast {
if(version.endsWith('SNAPSHOT')) {
thrownewGradleException("version '$version' ends with SNAPSHOT, this is not a release build!")
}
if(lastVersion != version) {
thrownewGradleException("lastVersion '$lastVersion' does not match version '$version', fix it in the 'gradle.properties' file.")
}
}
}
This is not perfect, but I least I will not forget to fix the value prior to a release.
The text was updated successfully, but these errors were encountered:
In my
gradle.properties
I want to keep trace of theversion
(example1.6.0-SNAPSHOT
) and the last released versionlastVersion
(example1.5.3
).This allows me to use the
lastVersion
in different places (docs, baseline definition).I am wondering if the release plugin could help me. Ideally:
The first commit:
[PATCH] [Gradle Release Plugin] - pre tag commit: '1.6.0'.
Would update both values:
The second commit:
[Gradle Release Plugin] - new version commit: '1.6.1-SNAPSHOT'.
The idea I had until now was to add a new task that ensure that
version
==lastVersion
during a release:This is not perfect, but I least I will not forget to fix the value prior to a release.
The text was updated successfully, but these errors were encountered: