5 if (defined($help) && $help eq "--help") {
7 Usage: $0 [-n] [version]
8 Tag this version of libucw as <version>.
10 If no <version> is given, a version number is computed by incrementing the last
11 number in the sequence, e.g. after 5.0 goes 5.1, etc.
14 -n show the version, do not create any tags
21 if (defined($dry) && $dry eq "-n") {
29 my $v = `git describe`;
33 print "Old version: $v\n";
36 my @c = split /\./, $v;
37 if (@c == 2) { push @c, 1; } else { $c[$#c]++; }
41 print "New version: $vv\n";
42 print "Not tagging, running with -n.\n" and exit 0 if $dry;
43 `git tag -a -m "Releasing version $vv" v$vv`;
45 print "Tagged. Do not forget to push with tags.\n";