[releng/abderrahim/downloadsites] fixup! refactor and partly rewrite convert-to-tarballs
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [releng/abderrahim/downloadsites] fixup! refactor and partly rewrite convert-to-tarballs
- Date: Thu, 30 Apr 2020 14:34:56 +0000 (UTC)
commit 6946b9ac1758ed07b6f7d0faa92958edb561bab1
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Thu Apr 30 15:34:09 2020 +0100
fixup! refactor and partly rewrite convert-to-tarballs
tools/smoketesting/convert-to-tarballs.py | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/tools/smoketesting/convert-to-tarballs.py b/tools/smoketesting/convert-to-tarballs.py
index 48af980..532d57b 100755
--- a/tools/smoketesting/convert-to-tarballs.py
+++ b/tools/smoketesting/convert-to-tarballs.py
@@ -90,9 +90,10 @@ class Options:
self.release_sets[release_set].append(name)
class ConvertToTarballs:
- def __init__(self, options, directory, convert=True):
+ def __init__(self, options, directory, convert=True, refs=False):
self.options = options
self.convert = convert
+ self.refs = refs
self.all_tarballs = []
self.all_versions = []
@@ -126,7 +127,7 @@ class ConvertToTarballs:
errors.append(name)
return None, None, None
- location, version, checksum = site.find_tarball(real_name, max_version, self.convert)
+ location, version, checksum = site.find_tarball(real_name, max_version, self.refs)
if None in (location, version):
errors.append(name)
@@ -280,7 +281,16 @@ def main(args):
parser.print_help()
sys.exit(1)
- convert = ConvertToTarballs(config, options.directory, options.convert)
+ if int(splitted_version[1]) % 2 == 0:
+ flatpak_branch = '{}.{}'.format(splitted_version[0], splitted_version[1])
+ update_flatpak_branch = True
+ elif int(splitted_version[2]) >= 90:
+ flatpak_branch = '{}.{}beta'.format(splitted_version[0], int(splitted_version[1]) + 1)
+ update_flatpak_branch = True
+ else:
+ update_flatpak_branch = False
+
+ convert = ConvertToTarballs(config, options.directory, options.convert, update_flatpak_branch)
convert.convert_modules([os.path.join(options.directory, 'elements', directory)
for directory in ('core-deps', 'core', 'sdk')])
@@ -295,15 +305,6 @@ def main(args):
convert.create_versions_file()
# update variables in the .gitlab-ci.yml
- if int(splitted_version[1]) % 2 == 0:
- flatpak_branch = '{}.{}'.format(splitted_version[0], splitted_version[1])
- update_flatpak_branch = True
- elif int(splitted_version[2]) >= 90:
- flatpak_branch = '{}.{}beta'.format(splitted_version[0], int(splitted_version[1]) + 1)
- update_flatpak_branch = True
- else:
- update_flatpak_branch = False
-
if update_flatpak_branch:
cifile = os.path.join(options.directory, '.gitlab-ci.yml')
with open(cifile) as f:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]