Skip to content

Commit

Permalink
fix VERSION input
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Jul 12, 2024
1 parent 927862d commit 960a5e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions embark/embark/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ def get_version_strings():
else:
emba_version = ""

if Path("./VERSION.txt").exists():
with open(Path("./VERSION.txt"), 'r', encoding='UTF-8') as embark_version_file:
if Path(f"{settings.BASE_DIR}/VERSION.txt").exists():
with open(Path(f"{settings.BASE_DIR}/VERSION.txt"), 'r', encoding='UTF-8') as embark_version_file:
embark_version = embark_version_file.read().splitlines()[0]
elif Path(f"{settings.BASE_DIR.parent}/VERSION.txt").exists():
with open(Path(f"{settings.BASE_DIR.parent}/VERSION.txt"), 'r', encoding='UTF-8') as embark_version_file:
embark_version = embark_version_file.read().splitlines()[0]
else:
embark_version = ""
Expand Down
4 changes: 3 additions & 1 deletion run-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ copy_file "${PWD}"/cert/embark.local.key /var/www/conf/cert
copy_file "${PWD}"/cert/embark-ws.local.key /var/www/conf/cert
copy_file "${PWD}"/cert/embark-ws.local.crt /var/www/conf/cert

# cp .env

# cp .env and version
copy_file ./.env /var/www/embark/embark/settings/
copy_file ./VERSION.txt /var/www/embark/

# !DIRECTORY-CHANGE!
cd /var/www/embark/ || exit 1
Expand Down

0 comments on commit 960a5e4

Please sign in to comment.