diff --git a/.github/workflows/docker-img.yml b/.github/workflows/docker-img.yml index aef033a..ad2f5cb 100644 --- a/.github/workflows/docker-img.yml +++ b/.github/workflows/docker-img.yml @@ -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" ]] diff --git a/api/VERSION b/api/VERSION new file mode 100644 index 0000000..ed63cdf --- /dev/null +++ b/api/VERSION @@ -0,0 +1 @@ +0.3.9 \ No newline at end of file diff --git a/api/siibra_api_config.py b/api/siibra_api_config.py index ba2d0c9..6f8d6d9 100644 --- a/api/siibra_api_config.py +++ b/api/siibra_api_config.py @@ -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")