Make bootstrap idempotent for redeployments

This commit is contained in:
Russell Ballestrini 2026-01-02 19:15:12 -05:00
parent 71ad0c9ba2
commit 2c13c8600f

View file

@ -1,9 +1,15 @@
#!/bin/bash
set -e
# Clone neopig from git
git clone https://git.unturf.com/engineering/unturf/pig.py.git neopig
cd neopig
# Clone or update neopig from git (idempotent)
if [ -d "neopig" ]; then
cd neopig
git fetch origin
git reset --hard origin/main
else
git clone https://git.unturf.com/engineering/unturf/pig.py.git neopig
cd neopig
fi
# Create virtualenv and install dependencies
python3 -m venv .venv