Skip to content

Instantly share code, notes, and snippets.

@michiels
Created December 28, 2011 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michiels/1528672 to your computer and use it in GitHub Desktop.
Save michiels/1528672 to your computer and use it in GitHub Desktop.
def new(project_name, config)
@workspace = File.expand_path(File.join("builds", project_name))
@build_directory = File.join(@workspace, "build")
@git_url = config['git']
@repository = nil
end
def build
create_workspace
clone_repository
end
private
def create_workspace
FileUtils.mkdir_p(@workspace)
end
def clone_repository
grit = Grit::Git.new('/tmp/grit-filler')
grit.clone(@git_url, @build_directory)
@repository = Grit::Repo.new(@build_directory)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment