From 0f916323d0cd92180615bd8c87f01de274f72c7a Mon Sep 17 00:00:00 2001 From: Austin King Date: Wed, 26 Jan 2011 21:04:29 -0800 Subject: [PATCH] Since playdoh has different branches on project and vendor repos... we should have two branches per env --- bin/update_site.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/update_site.py b/bin/update_site.py index 34bf722..314ae4e 100755 --- a/bin/update_site.py +++ b/bin/update_site.py @@ -17,10 +17,15 @@ from textwrap import dedent from optparse import OptionParser +# Constants +PROJECT = 0 +VENDOR = 1 + ENV_BRANCH = { - 'dev': 'master', # make this base if you are working on base - 'stage': 'master', - 'prod': 'prod', + # 'environment': [PROJECT_BRANCH, VENDOR_BRANCH], + 'dev': ['base', 'master'], + 'stage': ['master', 'master'], + 'prod': ['prod', 'master'], } GIT_PULL = "git pull -q origin %(branch)s" @@ -35,11 +40,12 @@ def update_site(env, debug): """Run through commands to update this site.""" error_updating = False here = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) - branch = {'branch': ENV_BRANCH[env]} + project_branch = {'branch': ENV_BRANCH[env][PROJECT]} + vendor_branch = {'branch': ENV_BRANCH[env][VENDOR]} commands = [ (CHDIR, here), - (EXEC, GIT_PULL % branch), + (EXEC, GIT_PULL % project_branch), (EXEC, GIT_SUBMODULE), ] @@ -59,7 +65,7 @@ def update_site(env, debug): commands += [ (CHDIR, os.path.join(here, 'vendor')), - (EXEC, GIT_PULL % branch), + (EXEC, GIT_PULL % vendor_branch), (EXEC, GIT_SUBMODULE), (CHDIR, os.path.join(here)), (EXEC, 'python vendor/src/schematic/schematic migrations/'),