File: tag-release.pl

package info (click to toggle)
libxml-libxslt-perl 2.003000-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 704 kB
  • sloc: xml: 2,181; perl: 1,227; ansic: 402; makefile: 24
file content (24 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl

use strict;
use warnings;

use Path::Tiny qw/ path /;

my ($version) =
    ( map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
        path('lib/XML/LibXSLT.pm')->lines_utf8() );

if ( !defined($version) )
{
    die "Version is undefined!";
}

my $DIST = "XML-LibXSLT";
my @cmd  = (
    "git", "tag", "-m", "Tagging the $DIST release as $version",
    "${DIST}-$version",
);

print join( " ", map { /\s/ ? qq{"$_"} : $_ } @cmd ), "\n";
exec(@cmd);