21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-28 15:00:50 +02:00
chexpire/script/to_staging

21 lines
467 B
Bash
Executable file

#!/bin/sh
# Copyright (C) 2018 Colin Darie <colin@darie.eu>, 2018 Evolix <info@evolix.fr>
# License: GNU AGPL-3+ (see full text in LICENSE file)
set -e
[ -n "$DEBUG" ] && set -x
echo "👀 Fetching git repository information…"
git fetch origin --quiet
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
echo "🚀 Deploying ${CURRENT_BRANCH} to staging !"
git branch -f staging
git push --force origin staging
bundle exec cap staging deploy
echo "😎 Done !"