From b6823521fb652c9381b8ed7b943f395d9522bf3a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 28 Oct 2022 20:10:53 +0200 Subject: [PATCH] use version instead of commit hash --- src/config.py | 2 +- src/utils/libjs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.py b/src/config.py index eb1e73d..e965906 100644 --- a/src/config.py +++ b/src/config.py @@ -33,7 +33,7 @@ def init() -> None: """Initialise everything before running the flask server""" # Download dependencies init_font("1.3.0") - init_libjs("fc5e3c53e41490e24ca7f67cb24e7ab389b770f9") + init_libjs("3.1.2") # Create upload folder if doesn't exists if not exist(Config.uploads_dir): diff --git a/src/utils/libjs.py b/src/utils/libjs.py index cac662f..c6623b6 100644 --- a/src/utils/libjs.py +++ b/src/utils/libjs.py @@ -5,7 +5,7 @@ from requests import get from utils.misc import exist -def init(commit_hash: str) -> None: +def init(version: str) -> None: """ Download JS libraries""" path = "./src/public/js/libs" filename = "bigint-mod.js" @@ -19,7 +19,7 @@ def init(commit_hash: str) -> None: # Download the js file if needed if not exist(f"{path}/{filename}"): # Download the font file - file_url = f"https://raw.githubusercontent.com/juanelas/bigint-mod-arith/{commit_hash}/dist/esm/index.browser.js" + file_url = f"https://raw.githubusercontent.com/juanelas/bigint-mod-arith/v{version}/dist/esm/index.browser.js" data = get(file_url).content # Save the file