From b9402e414477af3cf00ef6f49cde0afb74ddabc3 Mon Sep 17 00:00:00 2001 From: Oreoluwa Akinniranye Date: Tue, 5 Apr 2016 12:09:21 +0100 Subject: [PATCH] added a deploy script --- deploy.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..660a267 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ -z "$REMOTE" ]; then + branch='test' +else + branch=$REMOTE +fi + +git push $branch master + +heroku run rake db:migrate --remote $branch +heroku run rake zhishi:es:reindex[question] --remote $branch +heroku run rake zhishi:es:reindex[tag] --remote $branch