[Pkg-mozext-commits] [adblock-plus] 331/464: Release automation: Simplified source code tar creation now that subrepositories are used

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:30 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 9a52587b7ac0933674403551866c6a0eb6736658
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Wed Nov 21 14:54:57 2012 +0100

    Release automation: Simplified source code tar creation now that subrepositories are used
---
 build.py                  |  3 +--
 releaseAutomationGecko.py | 13 ++++---------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/build.py b/build.py
index 0936be5..beccd12 100644
--- a/build.py
+++ b/build.py
@@ -378,7 +378,6 @@ def generateDocs(baseDir, scriptName, opts, args, type):
 
 
 def runReleaseAutomation(baseDir, scriptName, opts, args, type):
-  buildtoolsRepo = buildtools.__path__[0]
   keyFile = None
   downloadsRepo = os.path.join(baseDir, '..', 'downloads')
   for option, value in opts:
@@ -402,7 +401,7 @@ def runReleaseAutomation(baseDir, scriptName, opts, args, type):
       print 'Warning: no key file specified, creating an unsigned release build\n'
 
     import buildtools.releaseAutomationGecko as releaseAutomation
-    releaseAutomation.run(baseDir, version, keyFile, downloadsRepo, buildtoolsRepo)
+    releaseAutomation.run(baseDir, version, keyFile, downloadsRepo)
   else:
     import buildtools.releaseAutomationKMeleon as releaseAutomation
     releaseAutomation.run(baseDir, downloadsRepo, buildtoolsRepo)
diff --git a/releaseAutomationGecko.py b/releaseAutomationGecko.py
index 5a9c35b..357930f 100644
--- a/releaseAutomationGecko.py
+++ b/releaseAutomationGecko.py
@@ -19,7 +19,7 @@ import os, re, subprocess, tarfile
 from StringIO import StringIO
 import buildtools.packagerGecko as packager
 
-def run(baseDir, version, keyFile, downloadsRepo, buildtoolsRepo):
+def run(baseDir, version, keyFile, downloadsRepo):
   # Replace version number in metadata file "manually", ConfigParser will mess
   # up the order of lines.
   handle = open(packager.getMetadataPath(baseDir), 'rb')
@@ -50,20 +50,15 @@ def run(baseDir, version, keyFile, downloadsRepo, buildtoolsRepo):
 
   archiveHandle = open(archivePath, 'wb')
   archive = tarfile.open(fileobj=archiveHandle, name=os.path.basename(archivePath), mode='w:gz')
-  (data, dummy) = subprocess.Popen(['hg', 'archive', '-R', baseDir, '-t', 'tar', '-X', os.path.join(baseDir, '.hgtags'), '-'], stdout=subprocess.PIPE).communicate()
+  (data, dummy) = subprocess.Popen(['hg', 'archive', '-R', baseDir, '-t', 'tar', '-S', '-'], stdout=subprocess.PIPE).communicate()
   repoArchive = tarfile.open(fileobj=StringIO(data), mode='r:')
   for fileInfo in repoArchive:
+    if os.path.basename(fileInfo.name) in ('.hgtags', '.hgignore'):
+      continue
     fileData = repoArchive.extractfile(fileInfo)
     fileInfo.name = re.sub(r'^[^/]+/', '', fileInfo.name)
     archive.addfile(fileInfo, fileData)
   repoArchive.close()
-  (data, dummy) = subprocess.Popen(['hg', 'archive', '-R', buildtoolsRepo, '-t', 'tar', '-X', os.path.join(buildtoolsRepo, '.hgtags'), '-'], stdout=subprocess.PIPE).communicate()
-  repoArchive = tarfile.open(fileobj=StringIO(data), mode='r:')
-  for fileInfo in repoArchive:
-    fileData = repoArchive.extractfile(fileInfo)
-    fileInfo.name = re.sub(r'^[^/]+/', 'buildtools/', fileInfo.name)
-    archive.addfile(fileInfo, fileData)
-  repoArchive.close()
   archive.close()
   archiveHandle.close()
 

-- 
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