Commits

Shlomi Fish  committed c6b1175

Add scripts/tag-release.pl.

  • Participants
  • Parent commits ffd2072
  • Tags XML-GrammarBase-v0.2.2

Comments (0)

Files changed (3)

File XML-GrammarBase/Changes

         - Bump the minimal version of XML-LibXML to 2.0017.
             - Done in order to avoid test failures with too low versions
             of libxml2 .
+        - Add scripts/tag-release.pl .
 
 v0.2.1  2013-01-23
         - Bump the minimal version of XML-LibXSLT to 1.80.

File XML-GrammarBase/MANIFEST

 lib/XML/GrammarBase/Role/XSLT.pm
 lib/XML/GrammarBase/Role/XSLT/Global.pm
 scripts/bump-version-number.pl
+scripts/tag-release.pl
 t/00-load.t
 t/01libxml-basic.t
 t/cpan-changes.t

File XML-GrammarBase/scripts/tag-release.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IO::All;
+
+my ($version) =
+    (map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
+    io->file('lib/XML/GrammarBase.pm')->getlines()
+    )
+    ;
+
+if (!defined ($version))
+{
+    die "Version is undefined!";
+}
+
+my @cmd = (
+    "hg", "tag", "-m",
+    "Tagging the XML-GrammarBase release as $version",
+    "XML-GrammarBase-v$version",
+);
+
+print join(" ", map { /\s/ ? qq{"$_"} : $_ } @cmd), "\n";
+exec(@cmd);
+