summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2021-04-06 15:34:11 +0700
committerDaniil Baturin <daniil@baturin.org>2021-04-06 15:34:11 +0700
commit7c440e8e97f2c231d3216f92017ae3dbf1fd6217 (patch)
tree42d3683a2e0e6ea60efea78de912ff6f80702b60 /scripts
parent567287a558c912453aa0d032d21b2bcc39c50dbb (diff)
downloadcommunity.vyos.net-7c440e8e97f2c231d3216f92017ae3dbf1fd6217.tar.gz
community.vyos.net-7c440e8e97f2c231d3216f92017ae3dbf1fd6217.zip
Temporarily generate lists of current branch builds only as a hotfix.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/list-nightly-builds.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/list-nightly-builds.py b/scripts/list-nightly-builds.py
index 042fd29..e75fdde 100755
--- a/scripts/list-nightly-builds.py
+++ b/scripts/list-nightly-builds.py
@@ -21,7 +21,7 @@ bucket = os.getenv("SNAPSHOTS_BUCKET")
def make_link(s, f):
f = re.sub(r'\s+', '+', f)
- return "https://s3.amazonaws.com/{0}/rolling/{1}".format(bucket, f)
+ return "https://s3.amazonaws.com/{0}/rolling/current/{1}".format(bucket, f)
def compare(l, r):
try:
@@ -39,16 +39,15 @@ def compare(l, r):
s3 = boto3.client('s3')
-object_listing = s3.list_objects_v2(Bucket=bucket, Prefix='rolling')
+object_listing = s3.list_objects_v2(Bucket=bucket, Prefix='rolling/current')
data = object_listing['Contents']
files = []
for f in data:
files.append(f['Key'])
-file_names = list(set(map(lambda s: re.sub(r'rolling/(.*?)', r'\1', s), files)))
+file_names = list(set(map(lambda s: re.sub(r'rolling/current/(.*?)', r'\1', s), files)))
file_names.sort(reverse=True, key=cmp_to_key(compare))
-file_names.remove('vyos-rolling-latest.iso')
builds = []
@@ -61,11 +60,8 @@ for name in file_names:
tmpl = jinja2.Template("""
<ul>
- <li><a href="{{latest}}">Latest build (symbolic link)</a></li>
{% for b in builds %}
<li><a href="{{b.link}}">{{b.file}}</a></li>
{% endfor %}
</ul>
""")
-
-print(tmpl.render(latest=make_link('rolling', 'vyos-rolling-latest.iso'), builds=builds))