Grails Application Version Update Plugin

6 votes
Dependency :
compile ":version-update:1.0.0"

Documentation Source Issues


Provides a more friendly way to update your application version.


As you don't need this plugin to be in your WAR file, you can use 'provided' scope in the dependency declaration (since Grails 2.x).

provided ":version-update:x.x.x"


Why should you use it?

When you have a bunch of applications to maintain and each of them needs to update its version with every change, and you combine that with your useless memory… you end up following always the same process:

  1. Make your changes
  2. Start writing the grails set-version command
  3. Forget which was the current version
  4. Check the file to get the current version
  5. Go back to your command and finish writing it
  6. Execute the command
So, when you get tired of that, you create a plugin for doing a little less steps and your process becomes:
  1. Make your changes
  2. Execute the grails update-version command
  3. Drink your coffee

How do you use it?

grails update-version $param

The idea is that you write the least possible. So by convention, if you don't type any params, the plugin will increase the last level of your version by one.

In case you type a param, it can be the exact version you want or you can do some tricks using a simple notation. Lets imagine that your current version is and you want to keep the 0, increase the 2, decrease the 4 and change the 6 to 1. The param you should type (for this extremely complicated version change) would be: x.+.-.1. Each char meaning, default values and configuration is explained below.

Lets think of some more common examples:

Old version:  0.2.4
Command:      grails update-version
New version:  0.2.5

Old version:  0.2.4
Command:      grails update-version x.+.x
New version:  0.3.4

Old version:  0.2.4
Command:      grails update-version +.+.0
New version:  1.3.0

Old version:  0.2.4
Command:      grails update-version 8.-.x
New version:  8.1.4

Need more information?

For more information about this plugin, please visit the GitHub page