From 1a3ed907215f1e14bfefd526d74caaf9ab5a74f0 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:12:07 -0500 Subject: [PATCH] Parse DJ_VERSION from pyproject.toml --- docker-compose-build.yaml | 2 +- docker-compose.yaml | 2 +- docs/docker-compose.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose-build.yaml b/docker-compose-build.yaml index 3dc50d4d5..3d21099d6 100644 --- a/docker-compose-build.yaml +++ b/docker-compose-build.yaml @@ -1,4 +1,4 @@ -# PY_VER=3.9 IMAGE=djbase DISTRO=debian DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py) HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from app --build +# PY_VER=3.9 IMAGE=djbase DISTRO=debian DJ_VERSION=$(grep -m 1 version pyproject.toml | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from app --build # # Intended for updating dependencies and docker image. # Used to build release artifacts. diff --git a/docker-compose.yaml b/docker-compose.yaml index 02e4b52aa..1a59bb8dc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -# DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py) docker compose --profile test up --build --exit-code-from djtest djtest +# DJ_VERSION=$(grep -m 1 version pyproject.toml | grep -oP '\d+\.\d+\.\d+') docker compose --profile test up --build --exit-code-from djtest djtest services: db: image: datajoint/mysql:${MYSQL_VER:-8.0} diff --git a/docs/docker-compose.yaml b/docs/docker-compose.yaml index ba0ff3373..ddb6fc94d 100644 --- a/docs/docker-compose.yaml +++ b/docs/docker-compose.yaml @@ -27,7 +27,7 @@ services: elif echo "$${MODE}" | grep -iE "qa|build" &>/dev/null; then git branch -D gh-pages || true git fetch $${UPSTREAM_REPO} gh-pages:gh-pages || true - mike deploy --config-file ./docs/mkdocs.yaml -u $$(grep -oE '\d+\.\d+' /main/$${PACKAGE}/version.py) latest + mike deploy --config-file ./docs/mkdocs.yaml -u $$(grep -m 1 version /main/pyproject.toml | grep -oP '\d+\.\d+\.\d+') latest mike set-default --config-file ./docs/mkdocs.yaml latest if echo "$${MODE}" | grep -i qa &>/dev/null; then mike serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80