Add tasks to modify project version

This commit is contained in:
Sebastian Sdorra
2021-01-13 10:38:20 +01:00
committed by René Pfeuffer
parent 7fd6b62b73
commit d2220af840
3 changed files with 72 additions and 5 deletions

View File

@@ -170,7 +170,20 @@ task cleanUpAfterPublishing {
}
task setVersion(type: YarnTask) {
args = ['run', 'set-version', project.version]
doFirst {
if (!project.hasProperty('newVersion')) {
throw new GradleException('newVersion properties is required, specify with -PnewVersion=x.y.z')
}
println "set ui package modules to new version ${project.property('newVersion')}"
}
if (project.hasProperty('newVersion')) {
args = ['run', 'set-version', project.property('newVersion')]
}
dependsOn('yarn_install')
}
task setVersionToNextSnapshot(type: YarnTask) {
args = ['run', 'set-version', nextSnapshotVersion]
dependsOn('yarn_install')
}