From f37cc2abe45eea45912c951d4d2c3668e1b85c34 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sun, 13 Feb 2022 20:23:58 +0100 Subject: [PATCH] Update production deployment script add a tag and a branch --- script/to_production | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/script/to_production b/script/to_production index 4ed4245..4f07527 100755 --- a/script/to_production +++ b/script/to_production @@ -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 !"