Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move prawn and rails unit test runs into Rakefile. Add simple git sup…
…port methods to Rake. Move some more config info into default properties
- Loading branch information
Showing
4 changed files
with
54 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
def git_repo_exists?(dir) | ||
File.exists? File.join(dir, ".git") | ||
end | ||
|
||
def git_shallow_clone(label, git_repository, local_directory) | ||
puts "No #{label} repo found: cloning to #{local_directory}" | ||
rm_rf local_directory # Something there, but not a git repo. Destroy! | ||
`git clone --depth 1 #{git_repository} #{local_directory}` | ||
Dir.chdir(local_directory) { yield } if block_given? | ||
end | ||
|
||
def git_pull(label, local_directory) | ||
puts "#{label} repo found: updating repo at #{local_directory}" | ||
`git pull` | ||
Dir.chdir(local_directory) { yield } if block_given? | ||
end |