chore: update bootstrap flow to clone golden image and track v2 branch

This commit is contained in:
Tibo De Peuter 2026-08-05 19:47:12 +02:00
parent 41f5e6bae8
commit c35e0ed40e
Signed by: tdpeuter
SSH key fingerprint: SHA256:u/h/LVoqKF1Iz02uOyxe6hcjmoZASCGV2HM0TG9ZMoU
3 changed files with 7 additions and 10 deletions

View file

@ -59,7 +59,7 @@ if [ -d "nix-config" ]; then
cd nix-config
git pull
else
git clone https://git.depeuter.dev/Bos55/nix-config.git
git clone -b v2 https://git.depeuter.dev/Bos55/nix-config.git
cd nix-config
fi

View file

@ -16,10 +16,10 @@ fi
cd nix-config || exit
git fetch origin main
git fetch origin v2
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse origin/main)
REMOTE=$(git rev-parse origin/v2)
if [ "$LOCAL" = "$REMOTE" ]; then
echo "Already up to date. Nothing to do."
@ -27,7 +27,7 @@ if [ "$LOCAL" = "$REMOTE" ]; then
fi
echo "Changes detected. Updating from $LOCAL to $REMOTE..."
git reset --hard origin/main
git reset --hard origin/v2
echo "Applying OpenTofu changes in $OPENTOFU_DIR..."
cd "$OPENTOFU_DIR" || exit