Commits

Shlomi Fish committed 0e8ecb9

Add the tag-release script.

  • Participants
  • Parent commits f45a130

Comments (0)

Files changed (2)

 scripts/bump-version-number.pl
 scripts/fast-eumm.pl
 scripts/prints-to-comments.pl
+scripts/tag-release.pl
 scripts/update-HACKING-file.bash
 scripts/Test.pm-to-Test-More.pl
 t/01basic.t

File scripts/tag-release.pl

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