diff --git a/deploy_local_dev.sh b/deploy_local_dev.sh index 07d3adba5ca7c5c51a19b06f4787fc983bb97eb0..70218ffcf33c94fe49d22cae4d1b585ffc2375f5 100644 --- a/deploy_local_dev.sh +++ b/deploy_local_dev.sh @@ -2,10 +2,17 @@ # be in an existing git cloned atdb-ldv directory (like $HOME/my_docker/atdb-ldv) -git pull +# Pull the latest changes and capture the output +OUTPUT=$(git pull) -cd atdb -docker build -t atdb-ldv:latest . +# Check if there are any changes pulled +if [[ $OUTPUT == *"Already up to date."* ]]; then + echo "No changes detected. Skipping redeploy." +else + echo "Changes detected. Proceeding with redeploy." -cd docker -docker-compose -f docker/docker-compose-dev-local.yml -p atdb up -d \ No newline at end of file + # Proceed with build and redeploy + cd atdb + docker build -t atdb-ldv:latest . + docker-compose -f docker/docker-compose-dev-local.yml -p atdb up -d +fi \ No newline at end of file