Index: releaseAutomationKMeleon.py |
=================================================================== |
--- a/releaseAutomationKMeleon.py |
+++ b/releaseAutomationKMeleon.py |
@@ -1,36 +1,36 @@ |
# coding: utf-8 |
# This Source Code is subject to the terms of the Mozilla Public License |
# version 2.0 (the "License"). You can obtain a copy of the License at |
# http://mozilla.org/MPL/2.0/. |
import os, re, subprocess, tarfile |
from StringIO import StringIO |
-import buildtools.packager as packager |
+import buildtools.packagerGecko as packagerBase |
import buildtools.packagerKMeleon as packagerKMeleon |
def run(baseDir, downloadsRepo, buildtoolsRepo): |
baseExtDir = packagerKMeleon.getBaseExtensionDir(baseDir) |
# Read extension name, version and branch name |
- locales = packager.readLocaleMetadata(baseExtDir, [packager.defaultLocale]) |
- extensionName = locales[packager.defaultLocale]['name'] + ' for K-Meleon' |
+ locales = packagerBase.readLocaleMetadata(baseExtDir, [packagerBase.defaultLocale]) |
+ extensionName = locales[packagerBase.defaultLocale]['name'] + ' for K-Meleon' |
- metadata = packager.readMetadata(baseExtDir) |
- metadata.read(packager.getMetadataPath(baseDir)) |
+ metadata = packagerBase.readMetadata(baseExtDir) |
+ metadata.read(packagerBase.getMetadataPath(baseDir)) |
branchName = metadata.get('general', 'branchname') |
version = metadata.get('general', 'version') |
# Tag our source repository |
subprocess.Popen(['hg', 'tag', '-R', baseDir, '-f', version]).communicate() |
# Create a release build |
- buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(baseDir, metadata, version, 'zip')) |
+ buildPath = os.path.join(downloadsRepo, packagerBase.getDefaultFileName(baseDir, metadata, version, 'zip')) |
packagerKMeleon.createBuild(baseDir, outFile=buildPath, releaseBuild=True) |
# Create source archive |
archivePath = os.path.splitext(buildPath)[0] + '-source.tgz' |
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() |