[Pkg-mozext-commits] [adblock-plus] 382/464: Added build type for Opera
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:35 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 249ef1ae634f3f940d443705f2b4e79184153d7e
Author: Wladimir Palant <trev at adblockplus.org>
Date: Fri May 24 15:22:43 2013 +0200
Added build type for Opera
---
build.py | 30 +++++++++++++++---------------
packagerChrome.py | 21 +++++++++++----------
2 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/build.py b/build.py
index c7e3762..8ef58d6 100644
--- a/build.py
+++ b/build.py
@@ -18,7 +18,7 @@
import os, sys, re, subprocess, buildtools
from getopt import getopt, GetoptError
-knownTypes = ('gecko', 'chrome')
+knownTypes = ('gecko', 'chrome', 'opera')
class Command(object):
name = property(lambda self: self._name)
@@ -195,9 +195,9 @@ def runBuild(baseDir, scriptName, opts, args, type):
packager.createBuild(baseDir, outFile=outFile, locales=locales, buildNum=buildNum,
releaseBuild=releaseBuild, keyFile=keyFile,
multicompartment=multicompartment)
- elif type == 'chrome':
+ elif type == 'chrome' or type == 'opera':
import buildtools.packagerChrome as packager
- packager.createBuild(baseDir, outFile=outFile, buildNum=buildNum,
+ packager.createBuild(baseDir, type=type, outFile=outFile, buildNum=buildNum,
releaseBuild=releaseBuild, keyFile=keyFile,
experimentalAPI=experimentalAPI)
@@ -235,7 +235,7 @@ def setupTranslations(baseDir, scriptName, opts, args, type):
key = args[0]
- if type == 'chrome':
+ if type == 'chrome' or type == 'opera':
import buildtools.packagerChrome as packager
locales = os.listdir(os.path.join(baseDir, '_locales'))
locales = map(lambda locale: locale.replace('_', '-'), locales)
@@ -257,7 +257,7 @@ def updateTranslationMaster(baseDir, scriptName, opts, args, type):
key = args[0]
- if type == 'chrome':
+ if type == 'chrome' or type == 'opera':
import buildtools.packagerChrome as packager
defaultLocaleDir = os.path.join(baseDir, '_locales', packager.defaultLocale)
metadata = packager.readMetadata(baseDir)
@@ -280,7 +280,7 @@ def uploadTranslations(baseDir, scriptName, opts, args, type):
key = args[0]
- if type == 'chrome':
+ if type == 'chrome' or type == 'opera':
import buildtools.packagerChrome as packager
localesDir = os.path.join(baseDir, '_locales')
locales = os.listdir(localesDir)
@@ -308,7 +308,7 @@ def getTranslations(baseDir, scriptName, opts, args, type):
return
key = args[0]
- if type == 'chrome':
+ if type == 'chrome' or type == 'opera':
import buildtools.packagerChrome as packager
localesDir = os.path.join(baseDir, '_locales')
else:
@@ -418,11 +418,11 @@ with addCommand(runBuild, 'build') as command:
command.params = '[options] [output_file]'
command.addOption('Only include the given locales (if omitted: all locales not marked as incomplete)', short='l', long='locales', value='l1,l2,l3', types=('gecko'))
command.addOption('Use given build number (if omitted the build number will be retrieved from Mercurial)', short='b', long='build', value='num')
- command.addOption('File containing private key and certificates required to sign the package', short='k', long='key', value='file', types=('gecko', 'chrome'))
+ command.addOption('File containing private key and certificates required to sign the package', short='k', long='key', value='file', types=('gecko', 'chrome', 'opera'))
command.addOption('Create a build for leak testing', short='m', long='multi-compartment', types=('gecko'))
command.addOption('Create a release build', short='r', long='release')
command.addOption('Enable use of experimental APIs', long='experimental')
- command.supportedTypes = ('gecko', 'chrome')
+ command.supportedTypes = ('gecko', 'chrome', 'opera')
with addCommand(runAutoInstall, 'autoinstall') as command:
command.shortDescription = 'Install extension automatically'
@@ -434,31 +434,31 @@ with addCommand(runAutoInstall, 'autoinstall') as command:
with addCommand(createDevEnv, 'devenv') as command:
command.shortDescription = 'Set up a development environment'
command.description = 'Will set up or update the devenv folder as an unpacked extension folder for development.'
- command.supportedTypes = ('chrome')
+ command.supportedTypes = ('chrome', 'opera')
with addCommand(setupTranslations, 'setuptrans') as command:
command.shortDescription = 'Sets up translation languages'
command.description = 'Sets up translation languages for the project on crowdin.net.'
command.params = '[options] project-key'
- command.supportedTypes = ('gecko', 'chrome')
+ command.supportedTypes = ('gecko', 'chrome', 'opera')
with addCommand(updateTranslationMaster, 'translate') as command:
command.shortDescription = 'Updates translation master files'
command.description = 'Updates the translation master files in the project on crowdin.net.'
command.params = '[options] project-key'
- command.supportedTypes = ('gecko', 'chrome')
+ command.supportedTypes = ('gecko', 'chrome', 'opera')
with addCommand(uploadTranslations, 'uploadtrans') as command:
command.shortDescription = 'Uploads existing translations'
command.description = 'Uploads already existing translations to the project on crowdin.net.'
command.params = '[options] project-key'
- command.supportedTypes = ('gecko', 'chrome')
+ command.supportedTypes = ('gecko', 'chrome', 'opera')
with addCommand(getTranslations, 'gettranslations') as command:
command.shortDescription = 'Downloads translation updates'
command.description = 'Downloads updated translations from crowdin.net.'
command.params = '[options] project-key'
- command.supportedTypes = ('gecko', 'chrome')
+ command.supportedTypes = ('gecko', 'chrome', 'opera')
with addCommand(showDescriptions, 'showdesc') as command:
command.shortDescription = 'Print description strings for all locales'
@@ -488,7 +488,7 @@ with addCommand(runReleaseAutomation, 'release') as command:
with addCommand(updatePSL, 'updatepsl') as command:
command.shortDescription = 'Updates Public Suffix List'
command.description = 'Downloads Public Suffix List (see http://publicsuffix.org/) and generates lib/publicSuffixList.js from it.'
- command.supportedTypes = ('chrome')
+ command.supportedTypes = ('chrome', 'opera')
def getType(baseDir, scriptName, args):
# Look for an explicit type parameter (has to be the first parameter)
diff --git a/packagerChrome.py b/packagerChrome.py
index e5fafbf..9b4ad31 100644
--- a/packagerChrome.py
+++ b/packagerChrome.py
@@ -19,18 +19,19 @@ import sys, os, re, json, struct
from StringIO import StringIO
import packager
-from packager import getDefaultFileName, getBuildVersion, getTemplate, Files
+from packager import readMetadata, getMetadataPath, getDefaultFileName, getBuildVersion, getTemplate, Files
defaultLocale = 'en_US'
-def getMetadataPath(baseDir):
- return packager.getMetadataPath(baseDir, 'chrome')
-
-def readMetadata(baseDir):
- return packager.readMetadata(baseDir, 'chrome')
-
def getIgnoredFiles(params):
- return set(('store.description',))
+ result = set(('store.description',))
+
+ # Hack: ignore all lib subdirectories
+ libDir = os.path.join(params['baseDir'], 'lib')
+ for file in os.listdir(libDir):
+ if os.path.isdir(os.path.join(libDir, file)):
+ result.add(file)
+ return result
def getPackageFiles(params):
result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui',))
@@ -273,8 +274,8 @@ def writePackage(outputFile, pubkey, signature, zipdata):
file.write(signature)
file.write(zipdata)
-def createBuild(baseDir, outFile=None, buildNum=None, releaseBuild=False, keyFile=None, experimentalAPI=False, devenv=False):
- metadata = readMetadata(baseDir)
+def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuild=False, keyFile=None, experimentalAPI=False, devenv=False):
+ metadata = readMetadata(baseDir, type)
version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum)
if outFile == None:
--
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