ianwhite-garlic 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/garlic/target.rb +5 -13
- data/lib/garlic.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/garlic/target.rb
CHANGED
@@ -78,25 +78,17 @@ module Garlic
|
|
78
78
|
cd(install_path) { `git checkout #{tree_ish || repo.head_sha}` }
|
79
79
|
|
80
80
|
else
|
81
|
+
old_tree_ish = repo.head_sha
|
82
|
+
repo.checkout(tree_ish) if tree_ish
|
81
83
|
if read_sha(install_path) == repo.head_sha
|
82
|
-
puts "#{install_path} is up to date"
|
84
|
+
puts "#{install_path} is up to date at #{tree_ish || 'default'}"
|
83
85
|
else
|
84
|
-
puts "#{install_path} needs update, exporting archive from #{repo.name}..."
|
85
|
-
if tree_ish
|
86
|
-
puts "Checking out #{tree_ish} of #{repo.name}"
|
87
|
-
old_tree_ish = repo.head_sha
|
88
|
-
repo.checkout(tree_ish) if tree_ish
|
89
|
-
end
|
90
|
-
|
86
|
+
puts "#{install_path} needs update to #{tree_ish || 'default'}, exporting archive from #{repo.name}..."
|
91
87
|
repo.export_to(File.join(path, install_path))
|
92
88
|
cd(path) { garlic.instance_eval(&block) } if block_given?
|
93
89
|
write_sha(install_path, repo.head_sha)
|
94
|
-
|
95
|
-
if tree_ish
|
96
|
-
puts "Checking #{repo.name} back to where it was (#{old_tree_ish})"
|
97
|
-
repo.checkout(old_tree_ish)
|
98
|
-
end
|
99
90
|
end
|
91
|
+
repo.checkout(old_tree_ish) if tree_ish
|
100
92
|
end
|
101
93
|
end
|
102
94
|
|
data/lib/garlic.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ianwhite-garlic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian White
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-08 00:00:00 -08:00
|
13
13
|
default_executable: garlic
|
14
14
|
dependencies: []
|
15
15
|
|