summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2022-05-21 15:54:30 +0300
committerDaniil Baturin <daniil@baturin.org>2022-05-21 15:59:42 +0300
commita3c89eecb2a57114df66c873350784377afee53f (patch)
tree166ac7025430b4c9eaa493b1a815d77f80eb241d /scripts
parent0b39afcc4e2cf26bbfb4b54e89b0b9a7932ed3e3 (diff)
downloadcommunity.vyos.net-a3c89eecb2a57114df66c873350784377afee53f.tar.gz
community.vyos.net-a3c89eecb2a57114df66c873350784377afee53f.zip
Use a shorter s3-us.vyos.io URL for snapshosts as well
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/list-snapshots.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/list-snapshots.py b/scripts/list-snapshots.py
index b298a5a..bea96fa 100755
--- a/scripts/list-snapshots.py
+++ b/scripts/list-snapshots.py
@@ -17,9 +17,9 @@ from functools import cmp_to_key
bucket = os.getenv("SNAPSHOTS_BUCKET")
-def make_link(s, f):
+def make_link(f):
f = re.sub(r'\s+', '+', f)
- return "https://s3.amazonaws.com/{0}/{1}".format(bucket, f)
+ return "https://s3-us.vyos.io/{0}".format(f)
def natural_sort(iterable, reverse=False):
import re
@@ -55,7 +55,7 @@ for name in snapshot_names:
snapshot['files'] = list(filter(lambda s: re.search(name, s), files))
snapshot_files = list(filter(lambda s: re.search(name, s), files))
- snapshot_files = list(map(lambda f: {'name': os.path.basename(f).strip(), 'platform': os.path.basename(os.path.dirname(f)), 'link': make_link(name, f)}, snapshot_files))
+ snapshot_files = list(map(lambda f: {'name': os.path.basename(f).strip(), 'platform': os.path.basename(os.path.dirname(f)), 'link': make_link(f)}, snapshot_files))
# S3 listing sometimes returns dir names among file names... filter those out.
snapshot_files = list(filter(lambda f: f['name'] != "", snapshot_files))