Well I wanted to know if I could get the latest tag from subversion, increment it and create the new tag all in one command? Currently I get the latest tag like this:
svn ls http://svn/path/to/tags | tail -n 1
Which gives me something like this:
1.2.34/
then I will create a new tag with the version number of 1.2.35 as I’ve incremented the version number like this:
svn copy http://svn/path/to/trunk http://svn/path/to/tags/1.2.35
from here I just do a switch to point production code to the latest tag.
I know I could write a script to take care of this but I wanted to know if I could do this just from the command line with one command (Chaining the commands). Were I’m stuck is, how do I increment the tag name to the next version number (e.g., from 1.2.34 to 1.2.35)? Version number ranges should follow x.[0-99].[0-99]. Any ideas, help would be great.
Related:
The “one liner” to get the next tag would be something like this:
… but you should probably just write a script so that you can actually test it. (And yes, I’m aware that the sort and tail and sed and awk could probably all collapse under its own weight into a bit of perl, but you’ll need all those “parts” in there somewhere.)