Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/bin/deploy

40 lines
1.4 KiB

#!/bin/bash
set -ex
[[ -z ${HEROKU_APPLICATION} ]] && HEROKU_APPLICATION=$1
[[ ! -s "$(git rev-parse --git-dir)/shallow" ]] || git fetch --unshallow origin
if ! git remote | grep heroku
then
git remote add heroku git@heroku.com:${HEROKU_APPLICATION}.git
git fetch heroku
fi
if ! git diff HEAD heroku/master --exit-code -- priv/repo
then
if heroku features --app $HEROKU_APPLICATION | grep '\[+\] preboot'
then
heroku features:disable preboot --app $HEROKU_APPLICATION
heroku maintenance:on --app $HEROKU_APPLICATION
heroku pg:killall --app $HEROKU_APPLICATION
git push heroku $CIRCLE_SHA1:refs/heads/master
heroku pg:backups capture --app $HEROKU_APPLICATION
heroku run "POOL_SIZE=2 mix ecto.migrate" --app $HEROKU_APPLICATION
heroku restart --app $HEROKU_APPLICATION
heroku maintenance:off --app $HEROKU_APPLICATION
heroku features:enable preboot --app $HEROKU_APPLICATION
else
heroku maintenance:on --app $HEROKU_APPLICATION
heroku pg:killall --app $HEROKU_APPLICATION
git push heroku $CIRCLE_SHA1:refs/heads/master
heroku pg:backups capture --app $HEROKU_APPLICATION
heroku run "POOL_SIZE=2 mix ecto.migrate" --app $HEROKU_APPLICATION
heroku restart --app $HEROKU_APPLICATION
heroku maintenance:off --app $HEROKU_APPLICATION
fi
else
git push heroku $CIRCLE_SHA1:refs/heads/master
heroku pg:backups capture --app $HEROKU_APPLICATION
fi