MarkAHershberger has submitted this change and it was merged.
Change subject: extract SMW extensions to a YAML file
......................................................................
extract SMW extensions to a YAML file
Having to change the python script anytime we want to tweak the
configuration is a bit cumbersome, instead extract out the list of SMW
extensions to a YAML file which would be easier to change/audit..
We could later on extends the concept to build other bundles such as
i18n or Wikibase.
Change-Id: If7e832201bcefe884ccc5fe44c4572a95757a377
---
M make-release/make-release.py
A make-release/make-release.yaml
2 files changed, 48 insertions(+), 25 deletions(-)
Approvals:
MarkAHershberger: Looks good to me, approved
jenkins-bot: Verified
diff --git a/make-release/make-release.py b/make-release/make-release.py
index c566daf..1ad415c 100755
--- a/make-release/make-release.py
+++ b/make-release/make-release.py
@@ -16,6 +16,9 @@
import subprocess
import sys
import time
+import yaml
+
+config = {}
def getVersionExtensions(version, extensions=[]):
@@ -102,12 +105,25 @@
return 'tags/' + version
+def read_config(conffile=None):
+ if conffile is None:
+ conffile = 'make-release.yaml'
+
+ if not os.path.isfile(conffile):
+ print "Configuration file not found: %s" % conffile
+ sys.exit(1)
+
+ return yaml.load(open('make-release.yaml'))
+
+
def parse_args():
"""Parse command line arguments and return options"""
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter,
)
+
+ parser.add_argument('--conf', help='specify the configuration file')
# Positional arguments:
parser.add_argument(
@@ -182,31 +198,14 @@
def main(self):
" return value should be usable as an exit code"
+ global config # yeah globals are evil. We know.
+ config = read_config(options.conf)
+
+ # TODO we should validate the YAML configuration file
+
extensions = []
- smwExtensions = [
- 'SemanticMediaWiki',
- 'SemanticResultFormats',
- 'SemanticForms',
- 'SemanticCompoundQueries',
- 'SemanticInternalObjects',
- 'SemanticDrilldown',
- 'SemanticMaps',
- 'SemanticWatchlist',
- 'SemanticTasks',
- 'SemanticFormsInputs',
- 'SemanticImageInput',
- 'Validator',
- 'AdminLinks',
- 'ApprovedRevs',
- 'Arrays',
- 'DataTransfer',
- 'ExternalData',
- 'HeaderTabs',
- 'Maps',
- 'PageSchemas',
- 'ReplaceText',
- 'Widgets',
- ]
+ bundles = config.get('bundles')
+ smwExtensions = bundles.get('smw')
# No version specified, assuming a snapshot release
if options.version is None:
@@ -393,7 +392,7 @@
"Tarignore %s not found, IGNORING." % tarignore
tarignore = None
- # Generate the .tar.gz file
+ # Generate the .tar.gz file
filename = dir + '/' + file + '.tar.gz'
outFile = open(filename, "w")
args = [tar, '--format=gnu', '--exclude-vcs']
diff --git a/make-release/make-release.yaml b/make-release/make-release.yaml
new file mode 100644
index 0000000..1a30e84
--- /dev/null
+++ b/make-release/make-release.yaml
@@ -0,0 +1,24 @@
+bundles:
+ smw:
+ - AdminLinks
+ - ApprovedRevs
+ - Arrays
+ - DataTransfer,
+ - ExternalData
+ - HeaderTabs
+ - Maps
+ - PageSchemas
+ - ReplaceText
+ - SemanticCompoundQueries
+ - SemanticDrilldown,
+ - SemanticForms,
+ - SemanticFormsInputs,
+ - SemanticImageInput
+ - SemanticInternalObjects
+ - SemanticMaps
+ - SemanticMediaWiki
+ - SemanticResultFormats
+ - SemanticTasks
+ - SemanticWatchlist
+ - Validator
+ - Widgets
--
To view, visit https://gerrit.wikimedia.org/r/81573
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If7e832201bcefe884ccc5fe44c4572a95757a377
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: MarkAHershberger <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits