Debian Codegraph @

scripts/tag-release.pl

raw
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use IO::All;
7
8 my ($version) =
9 (map { m{\$VERSION *= *"([^"]+)"} ? ($1) : () }
10 io->file('LibXML.pm')->getlines()
11 )
12 ;
13
14 if (!defined ($version))
15 {
16 die "Version is undefined!";
17 }
18
19 my @cmd = (
20 "git", "tag", "-m",
21 "Tagging the XML-LibXML release as $version",
22 "XML-LibXML-$version",
23 );
24
25 print join(" ", map { /\s/ ? qq{"$_"} : $_ } @cmd), "\n";
26 exec(@cmd);
27