[Pkg-mozext-commits] [adblock-plus] 52/464: Generalized release script and moved it out of extension directories as well.

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit ecfb1232036d16ec4ff8511c273d01bcdf85e46f
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Aug 28 15:28:40 2009 +0200

    Generalized release script and moved it out of extension directories as well.
---
 make_release.pl | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/make_release.pl b/make_release.pl
new file mode 100644
index 0000000..9e8b84f
--- /dev/null
+++ b/make_release.pl
@@ -0,0 +1,68 @@
+#!/usr/bin/perl
+
+#############################################################################
+# This is the release automation script, it will change current extension   #
+# version, create release builds and commit it all into Mercurial. Usually  #
+# you just want to create a build - use make_devbuild.pl for this.          #
+#############################################################################
+
+use strict;
+use Cwd;
+
+our $BRANCH_NAME;
+
+die "This script cannot be called directly, please call the script for a particular extension" unless $BRANCH_NAME;
+
+my $manifest = readFile("chrome.manifest");
+unless ($manifest =~ /\bjar:chrome\/(\S+?)\.jar\b/)
+{
+  die "Could not find JAR file name in chrome.manifest";
+}
+my $baseName = $1;
+
+my $installRDF = readFile("install.rdf");
+$installRDF =~ s/<em:(requires|targetApplication)>.*?<\/em:\1>//gs;
+unless ($installRDF =~ /<em:name>\s*([^<>]+?)\s*<\/em:name>/)
+{
+  die "Could not find extension name in install.rdf";
+}
+my $extensionName = $1;
+
+die "Version number not specified" unless @ARGV;
+
+my $version = $ARGV[0];
+$version =~ s/[^\w\.]//gs;
+
+open(VERSION, ">version");
+print VERSION $ARGV[0];
+close(VERSION);
+
+ at ARGV = ("../downloads/$baseName-$version.xpi");
+do '../create_xpi.pl';
+
+die "Failed to determine current directory name" unless cwd() =~ /([^\\\/]+)[\\\/]?$/;
+my $dir = $1;
+
+chdir('..');
+system("hg add downloads/$baseName-$version.xpi");
+system(qq(hg commit -m "Releasing $extensionName $version" downloads $dir));
+
+my $branch = $version;
+$branch =~ s/\./_/g;
+$branch = $BRANCH_NAME."_".$branch."_RELEASE";
+system(qq(hg tag $branch));
+
+#system(qq(hg push));
+
+sub readFile
+{
+  my $file = shift;
+
+  open(local *FILE, "<", $file) || die "Could not read file '$file'";
+  binmode(FILE);
+  local $/;
+  my $result = <FILE>;
+  close(FILE);
+
+  return $result;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list