Skip to content

Commit

Permalink
fix: version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Jun 29, 2023
1 parent 6d8fa20 commit 9f083a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
-p '${{ secrets.EBRAINS_DOCKER_REG_TOKEN }}' \
docker-registry.ebrains.eu
VERSION=$(grep -Po '^__version__.*?"\K[\w.]+' api/siibra_api_config.py)
VERSION=$(cat api/VERSION)
while [[ "$VERSION" == *"."* ]]
do
if [[ "$BREAK" == "0" ]]
Expand Down
1 change: 1 addition & 0 deletions api/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.9
4 changes: 3 additions & 1 deletion api/siibra_api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def get_config_dir_short_hash(path_to_config: str):

# allowing potentially other hashes to be populated here.
# e.g. siibra-python hash, siibra-api hash
__version__ = (_config_hash and f"c.{_config_hash}") or "0.3.9"
with open(Path(__file__).parent / 'VERSION', 'r') as fp:
__version__ = fp.read()
__version__ = (_config_hash and f"c.{_config_hash}") or __version__

NAME_SPACE = os.environ.get("SIIBRA_API_NAMESPACE", "siibraapi")

Expand Down

0 comments on commit 9f083a3

Please sign in to comment.