Commit aa0abbf8 authored by Konstantin Schulz's avatar Konstantin Schulz

fixed missing version file issue during CI

parent 2840244d
Pipeline #15841 failed with stages
in 2 minutes and 5 seconds
python3 ./mc_frontend/update_version.py
docker-compose build
docker-compose down
docker-compose up -d
......@@ -17,6 +17,8 @@ RUN ng analytics off
RUN npm install
COPY . .
# python version in this container is 3.5.3
RUN python3 update_version.py
COPY ./config.xml ./www/config.xml
# workaround to fix the missing binding issue for node-sass
......
......@@ -2,10 +2,10 @@ try:
import os
import subprocess
current_path: str = os.path.realpath(__file__)
version_file_path: str = os.path.join(os.path.dirname(current_path), "src", "version.ts")
tag_bytes: bytes = subprocess.check_output("git tag --points-at HEAD", shell=True)
current_path = os.path.realpath(__file__)
version_file_path = os.path.join(os.path.dirname(current_path), "src", "version.ts")
tag_bytes = subprocess.check_output("git tag --points-at HEAD", shell=True)
with open(version_file_path, "w+") as f:
f.write(f"export const version = '{tag_bytes[:-1].decode('utf-8')}';\n")
f.write("export const version = '{0}';\n".format(tag_bytes[:-1].decode('utf-8')))
except:
pass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment