Skip to content

Commit cbbd203

Browse files
committed
using actual s3 link
1 parent 112e0b3 commit cbbd203

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/create_download_tracker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
LOGGER = logging.getLogger(__name__)
1616
PROJECT_PATH = './scripts/rdt-download-tracker'
17-
BUCKET = os.getenv('DOWNLOAD_TRACKER_BUCKET', 'datacebo-download-tracking-pypi')
17+
BUCKET = os.getenv('DOWNLOAD_TRACKER_BUCKET', '')
1818
S3_PACKAGE_PATH = 'simple/rdt-download-tracker/'
1919
INDEX_FILE_NAME = 'index.html'
2020

@@ -60,7 +60,8 @@ def _update_index_html(files, s3_client, dryrun=False):
6060
current_text = current_index_file[:insertion_point]
6161
text_list = [current_text]
6262
for file in files:
63-
new_link = f"<a href='{file}'>{file}</a>"
63+
download_link = f'https://{BUCKET}.s3.us-east-1.amazonaws.com/{S3_PACKAGE_PATH}{file}'
64+
new_link = f"<a href='{download_link}'>{file}</a>"
6465
if new_link not in current_text:
6566
text_list.append(new_link)
6667
text_list.append('<br>')

0 commit comments

Comments
 (0)