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

@@ -6,6 +6,14 @@ if [ ! -f .env ]; then
touch .env
fi
# 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}
# Allow local X server connections
xhost +local:
@@ -22,10 +30,11 @@ if command -v hostname >/dev/null 2>&1; then
fi
export SRC_PATH=$(pwd)
export IMAGE="thechart:latest"
export IMAGE="thechart:$APP_VERSION"
export XAUTHORITY=$HOME/.Xauthority
echo "Building and running the container..."
echo "Using APP_VERSION=$APP_VERSION"
echo "Using DISPLAY=$DISPLAY"
echo "Using SRC_PATH=$SRC_PATH"
echo "Using XAUTHORITY=$XAUTHORITY"