Skip to content

Commit

Permalink
Cleaned CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Feb 20, 2011
1 parent a8312c9 commit 41b249e
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions cli
Expand Up @@ -268,9 +268,17 @@ class App
run("git push origin --all")
end

# Pull From Everywhere
def pull
run("git pull --all")
end

# ===========================================================================
# Git Handlers

# ---------------------------------------------------------------------------
# Checkout

# Checkout Version Branch
def version
checkout(BRANCH_VERSION)
Expand All @@ -286,6 +294,18 @@ class App
checkout(BRANCH_MASTER)
end

# ---------------------------------------------------------------------------
# Branch

# Update Branch
def update_branch(branch)
checkout(branch)
update
end

# ---------------------------------------------------------------------------
# Branches

# Initialise Branches
def init_branches
remote_add(REMOTE_ALOHA_URL,REMOTE_ALOHA)
Expand All @@ -294,6 +314,16 @@ class App
dev
end

# Update Branches
def update_branches
update_branch(BRANCH_MASTER)
update_branch(BRANCH_VERSION)
update_branch(BRANCH_DEV)
end

# ---------------------------------------------------------------------------
# Submodules

# Initialise Submodules
def init_submodules
run("
Expand Down Expand Up @@ -321,24 +351,8 @@ class App
")
end

# Update Branches
def update_branches
update_branch(BRANCH_MASTER)
update_branch(BRANCH_VERSION)
update_branch(BRANCH_DEV)
end

# Update Branch
def update_branch(branch)
checkout(branch)
update
end

# Update
def update
run("git pull --all")
update_submodules
end
# ---------------------------------------------------------------------------
# Utility

# Install Aloha Editor
def install
Expand All @@ -347,11 +361,21 @@ class App
update_branches
end

# Update
def update
pull
update_submodules
end

# Upgrade Aloha Editor
def upgrade
update_branches
pull
upgrade_submodules
end

# ---------------------------------------------------------------------------
# Deploy

# Deploy the Changes From Master to Version + Dev
def deploy_from_master
version
Expand Down

0 comments on commit 41b249e

Please sign in to comment.