chexpire/script/to_staging

21 lines
470 B
Bash
Executable File

#!/bin/bash
# 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 !"