mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155349 - set packageFilename in mach properties; r=glandium
This commit is contained in:
parent
d1cc1b3152
commit
1ace684ee5
@ -40,7 +40,7 @@ def getMarProperties(filename, partial=False):
|
|||||||
'%sMarHash' % martype: mar_hash,
|
'%sMarHash' % martype: mar_hash,
|
||||||
}
|
}
|
||||||
|
|
||||||
def getUrlProperties(filename):
|
def getUrlProperties(filename, package):
|
||||||
# let's create a switch case using name-spaces/dict
|
# let's create a switch case using name-spaces/dict
|
||||||
# rather than a long if/else with duplicate code
|
# rather than a long if/else with duplicate code
|
||||||
property_conditions = [
|
property_conditions = [
|
||||||
@ -57,9 +57,7 @@ def getUrlProperties(filename):
|
|||||||
('codeCoverageURL', lambda m: m.endswith('code-coverage-gcno.zip')),
|
('codeCoverageURL', lambda m: m.endswith('code-coverage-gcno.zip')),
|
||||||
('sdkUrl', lambda m: m.endswith(('sdk.tar.bz2', 'sdk.zip'))),
|
('sdkUrl', lambda m: m.endswith(('sdk.tar.bz2', 'sdk.zip'))),
|
||||||
('testPackagesUrl', lambda m: m.endswith('test_packages.json')),
|
('testPackagesUrl', lambda m: m.endswith('test_packages.json')),
|
||||||
# packageUrl must be last!
|
('packageUrl', lambda m: m.endswith(package)),
|
||||||
('packageUrl', lambda m: (not m.endswith('.json') and
|
|
||||||
not m.endswith('tests.zip'))),
|
|
||||||
]
|
]
|
||||||
url_re = re.compile(r'''^(https?://.*?\.(?:tar\.bz2|dmg|zip|apk|rpm|mar|tar\.gz|json))$''')
|
url_re = re.compile(r'''^(https?://.*?\.(?:tar\.bz2|dmg|zip|apk|rpm|mar|tar\.gz|json))$''')
|
||||||
properties = {}
|
properties = {}
|
||||||
@ -102,10 +100,13 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument("--upload-files", required=True, nargs="+",
|
parser.add_argument("--upload-files", required=True, nargs="+",
|
||||||
action="store", dest="upload_files",
|
action="store", dest="upload_files",
|
||||||
help="List of files to be uploaded.")
|
help="List of files to be uploaded.")
|
||||||
|
parser.add_argument("--package", required=True,
|
||||||
|
action="store", dest="package",
|
||||||
|
help="Filename of the build package")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
json_data = getMarProperties(args.complete_mar_file)
|
json_data = getMarProperties(args.complete_mar_file)
|
||||||
json_data.update(getUrlProperties(args.upload_output))
|
json_data.update(getUrlProperties(args.upload_output, args.package))
|
||||||
if args.partial_mar_file:
|
if args.partial_mar_file:
|
||||||
json_data.update(getMarProperties(args.partial_mar_file, partial=True))
|
json_data.update(getMarProperties(args.partial_mar_file, partial=True))
|
||||||
|
|
||||||
@ -119,6 +120,7 @@ if __name__ == '__main__':
|
|||||||
json_data['partialInfo'] = getPartialInfo(json_data)
|
json_data['partialInfo'] = getPartialInfo(json_data)
|
||||||
|
|
||||||
json_data['uploadFiles'] = args.upload_files
|
json_data['uploadFiles'] = args.upload_files
|
||||||
|
json_data['packageFilename'] = args.package
|
||||||
|
|
||||||
with open('mach_build_properties.json', 'w') as outfile:
|
with open('mach_build_properties.json', 'w') as outfile:
|
||||||
json.dump(json_data, outfile, indent=4)
|
json.dump(json_data, outfile, indent=4)
|
||||||
|
@ -99,7 +99,7 @@ automation/l10n-check: automation/pretty-l10n-check
|
|||||||
automation/update-packaging: automation/pretty-update-packaging
|
automation/update-packaging: automation/pretty-update-packaging
|
||||||
|
|
||||||
automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
|
automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
|
||||||
$(PYTHON) $(topsrcdir)/build/gen_mach_buildprops.py --complete-mar-file $(DIST)/$(COMPLETE_MAR) $(addprefix --partial-mar-file ,$(wildcard $(DIST)/$(PARTIAL_MAR))) --upload-output $(AUTOMATION_UPLOAD_OUTPUT) --upload-files $(abspath $(UPLOAD_FILES))
|
$(PYTHON) $(topsrcdir)/build/gen_mach_buildprops.py --complete-mar-file $(DIST)/$(COMPLETE_MAR) $(addprefix --partial-mar-file ,$(wildcard $(DIST)/$(PARTIAL_MAR))) --upload-output $(AUTOMATION_UPLOAD_OUTPUT) --upload-files $(abspath $(UPLOAD_FILES)) --package $(PACKAGE)
|
||||||
|
|
||||||
# We need the log from make upload to grep it for urls in order to set
|
# We need the log from make upload to grep it for urls in order to set
|
||||||
# properties.
|
# properties.
|
||||||
|
Loading…
Reference in New Issue
Block a user