use version instead of commit hash
This commit is contained in:
parent
42086bfa47
commit
b6823521fb
2 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue