feat: Implement automatic version synchronization between .env and pyproject.toml, update docker scripts to get version from .env

This commit is contained in:
William Valentin
2025-08-06 13:37:32 -07:00
parent 8336bbb9db
commit 8dc2fdf69f
8 changed files with 429 additions and 6 deletions

View File

@@ -1,20 +1,27 @@
#!/usr/bin/bash
CONTAINER_ENGINE="docker" # podman | docker
VERSION="v1.7.5"
REGISTRY="gitea-http.taildb3494.ts.net/will/thechart"
# Source .env file to load environment variables
if [ -f .env ]; then
source .env
fi
# Set APP_VERSION from .env VERSION, with fallback
export APP_VERSION=${VERSION}
if [ "$CONTAINER_ENGINE" == "podman" ];
then
buildah build \
-t $REGISTRY:$VERSION \
-t $REGISTRY:$APP_VERSION \
--platform linux/amd64 \
--no-cache .
else
DOCKER_BUILDKIT=1 \
docker buildx build \
--platform linux/amd64 \
-t $REGISTRY:$VERSION \
-t $REGISTRY:$APP_VERSION \
--no-cache \
--push .
fi