Update production deployment script

add a tag and a branch
This commit is contained in:
Jérémy Lecour 2022-02-13 20:23:58 +01:00 committed by Jérémy Lecour
parent 6cf33bbc0c
commit f37cc2abe4
1 changed files with 12 additions and 1 deletions

View File

@ -34,7 +34,18 @@ if [ "${confirmed}" != "y" ]; then
exit 1
fi
echo "🚀 Deploying master to production !"
echo "🚀 Deploying ${CURRENT_BRANCH} to production !"
# une branche "production" est (re)initialisée sur le commit courant
git branch -f production
# … et poussée sur le mote "origin"
git push --force origin production
# et le déploiement a lieu
bundle exec cap production deploy
# création du tag
TAG="prod-${TIMESTAMP}-$(logname)"
git tag ${TAG} && git push origin tag ${TAG}
echo "😎 Done !"