Skip to content

Commit

Permalink
update the code to fetch then checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Dec 22, 2024
1 parent aee8856 commit 41a652d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ locals {
# Verify installation
systemctl status amazon-cloudwatch-agent
if [ ! -d "/opt/swarms/" ]; then
git clone https://github.com/jmikedupont2/swarms "/opt/swarms/"
fi
cd "/opt/swarms/" || exit 1
export BRANCH=${var.branch}
git stash
git fetch --all # get the latest version
git checkout --force $BRANCH
git pull # get the latest version
bash -x ${var.install_script}
EOF

Expand Down

0 comments on commit 41a652d

Please sign in to comment.