sinatra-packrat 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/packrat +13 -0
- metadata +3 -3
data/bin/packrat
CHANGED
@@ -52,4 +52,17 @@ config["modules"].each do |mod|
|
|
52
52
|
print "Cloning #{full_git_path} into #{repo_path} \n"
|
53
53
|
`git clone #{full_git_path} #{repo_path}`
|
54
54
|
end
|
55
|
+
|
56
|
+
Dir.chdir repo_path do
|
57
|
+
if (mod["ref"] || mod["tag"])
|
58
|
+
`git checkout #{mod["ref"] || mod["tag"]}`
|
59
|
+
elsif mod["branch"]
|
60
|
+
branch = mod["branch"]
|
61
|
+
out = `git checkout #{branch}`
|
62
|
+
unless $?.exitstatus == 0
|
63
|
+
`git checkout --track -b #{branch} origin/#{branch}`
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
55
68
|
end if config["modules"].respond_to? :each
|