from subprocess import check_call

from blackbelt.handle_github import get_current_branch
from blackbelt.messages import post_message


def deploy_staging():
    branch_name = get_current_branch()

    post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")

    check_call(['grunt', 'deploy', '--app=apiary-staging', '--force', "--branch=%s" % branch_name])

def deploy_production():
    post_message("Deploying to production", "#deploy-queue")

    check_call(['grunt', 'deploy'])

@@ -330,16 +330,22 @@
 -staging
+-pool1
 ', '--fo
@@ -504,8 +504,68 @@
 ploy'%5D)%0A
+    check_call(%5B'grunt', 'deploy', '--app=apiary-staging'%5D)%0A

Update deploy and stage with new environ