2022-11-08 20:52:56 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
echo ">> updating everything....."
|
|
|
|
|
|
|
|
echo ">> updating local brew dependencies...."
|
|
|
|
brew update
|
2023-03-04 23:21:41 +00:00
|
|
|
|
2022-11-08 20:52:56 +00:00
|
|
|
echo ">> which leaves these outdated...."
|
|
|
|
brew outdated
|
|
|
|
echo
|
|
|
|
read -p ">> upgrade? (y/n) " updatebrew
|
|
|
|
|
2023-03-04 23:21:41 +00:00
|
|
|
if [ $updatebrew == "y" ]; then
|
2022-11-08 20:52:56 +00:00
|
|
|
echo ">> upgrading......"
|
|
|
|
brew upgrade
|
|
|
|
fi
|
|
|
|
|
2023-03-04 23:21:41 +00:00
|
|
|
echo
|
|
|
|
echo ">> checking terraform diff...."
|
|
|
|
cd ~/dev/infra/terraform
|
|
|
|
terraform plan
|
|
|
|
|
2022-11-08 20:52:56 +00:00
|
|
|
echo
|
2023-03-04 23:21:41 +00:00
|
|
|
read -p ">> apply terraform changes? (y/n) " updateterraform
|
|
|
|
|
|
|
|
if [ $updateterraform == "y" ]; then
|
|
|
|
echo ">> applying......"
|
|
|
|
terraform apply -auto-approve
|
|
|
|
fi
|
2022-11-08 20:52:56 +00:00
|
|
|
|
|
|
|
echo
|
2023-03-04 23:21:41 +00:00
|
|
|
read -p ">> update ansible environment? (y/n) " updateansible
|
|
|
|
|
|
|
|
if [ $updateansible == "y" ]; then
|
|
|
|
echo ">> upgrading......"
|
|
|
|
cd ~/dev/infra/ansible
|
|
|
|
poetry update
|
|
|
|
fi
|
|
|
|
|
2022-11-08 20:52:56 +00:00
|
|
|
echo
|
|
|
|
echo ">> running a few playbooks...."
|
|
|
|
echo
|
2023-03-04 23:21:41 +00:00
|
|
|
cd ~/dev/infra/ansible
|
2022-11-08 20:52:56 +00:00
|
|
|
./update
|