Files
brewman/deploy.sh

24 lines
416 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path" || exit
./lint.sh
if [ 1 -eq "$#" ]
then
./version_bump.sh "$1"
else
./version_bump.sh
fi
make build-production
if [ 1 -eq "$#" ]
then
docker tag brewman:latest "$1"
else
echo "No version bump"
fi
cd "$parent_path/ansible" || exit
ansible-playbook --inventory hosts playbook.yml