barker/deploy.sh
Amritanshu 2495c24e1a Chore: Updated python dependencies
Chore: Updated angular to v19
Chore: Refactored ops with docker and ansible
2024-12-16 17:58:17 +05:30

26 lines
520 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 barker:latest "$1"
else
echo "No version bump"
fi
docker tag barker:latest registry.tanshu.com/barker:latest
docker push registry.tanshu.com/barker:latest
cd "$parent_path/ansible" || exit
ansible-playbook --inventory hosts playbook.yml