Skip to content

Commit 2c8a7ab

Browse files
committed
Modified the set-version command so that it prints a warning and exits
when run from a plugin project (since it can't update the version number of a plugin).
1 parent a43b509 commit 2c8a7ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/SetVersion.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
includeTargets << grailsScript("_GrailsEvents")
2828

2929
target ('default': "Sets the current application version") {
30+
if (isPluginProject) {
31+
println "The set-version command cannot update the version of a plugin project. Change the value of the 'version' property in ${pluginSettings.basePluginDescriptor.filename} instead."
32+
exit(1)
33+
}
34+
3035
if (args != null) {
3136
ant.property(name:"app.version.new", value: args)
3237
}

0 commit comments

Comments
 (0)