Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:defunkt/cijoe
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Aug 10, 2009
2 parents 230bfa6 + 38e03b0 commit 7bfb5ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/cijoe.rb
Expand Up @@ -103,18 +103,23 @@ def runner_command
end

def git_sha
`git rev-parse origin/master`.chomp
`git rev-parse origin/#{git_branch}`.chomp
end

def git_update
`git fetch origin && git reset --hard origin/master`
`git fetch origin && git reset --hard origin/#{git_branch}`
run_hook "after-reset"
end

def git_user_and_project
Config.remote.origin.url.to_s.chomp('.git').split(':')[-1].split('/')[-2, 2]
end

def git_branch
branch = Config.cijoe.branch.to_s
branch == '' ? "master" : branch
end

# massage our repo
def run_hook(hook)
if File.exists?(file=".git/hooks/#{hook}") && File.executable?(file)
Expand Down

0 comments on commit 7bfb5ea

Please sign in to comment.