feat: Implement automatic version synchronization between .env and pyproject.toml, update docker scripts to get version from .env
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user