Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.1.8 release: fix bug where dependencies weren't checking out repo t…

…ags or branches properly
  • Loading branch information...
commit bb09440f15bf3a687b93b783dc6a11a34cc6e3af 1 parent 74d1c7d
@ianwhite authored
View
5 History.txt
@@ -1,3 +1,8 @@
+== 0.1.8
+
+* 1 bugfix
+ * fix problem where dependencies weren't checking out repo tags or branches properly
+
== 0.1.7
* 2 minor enhancement
View
6 garlic.gemspec
@@ -1,12 +1,12 @@
# -*- encoding: utf-8 -*-
-#
+
Gem::Specification.new do |s|
s.name = %q{garlic}
- s.version = "0.1.7"
+ s.version = "0.1.8"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ian White"]
- s.date = %q{2009-01-22}
+ s.date = %q{2009-02-08}
s.default_executable = %q{garlic}
s.description = %q{Set of commands/rake-tasks for CI against multiple version of rails/deps.}
s.email = %q{ian.w.white@gmail.com}
View
2  lib/garlic.rb
@@ -11,7 +11,7 @@ module Garlic
module Version
Major = 0
Minor = 1
- Tiny = 7
+ Tiny = 8
String = [Major, Minor, Tiny].join('.')
end
View
18 lib/garlic/target.rb
@@ -78,25 +78,17 @@ def install_dependency(repo, install_path = ".", options = {}, &block)
cd(install_path) { `git checkout #{tree_ish || repo.head_sha}` }
else
+ old_tree_ish = repo.head_sha
+ repo.checkout(tree_ish) if tree_ish
if read_sha(install_path) == repo.head_sha
- puts "#{install_path} is up to date"
+ puts "#{install_path} is up to date at #{tree_ish || 'default'}"
else
- puts "#{install_path} needs update, exporting archive from #{repo.name}..."
- if tree_ish
- puts "Checking out #{tree_ish} of #{repo.name}"
- old_tree_ish = repo.head_sha
- repo.checkout(tree_ish) if tree_ish
- end
-
+ puts "#{install_path} needs update to #{tree_ish || 'default'}, exporting archive from #{repo.name}..."
repo.export_to(File.join(path, install_path))
cd(path) { garlic.instance_eval(&block) } if block_given?
write_sha(install_path, repo.head_sha)
-
- if tree_ish
- puts "Checking #{repo.name} back to where it was (#{old_tree_ish})"
- repo.checkout(old_tree_ish)
- end
end
+ repo.checkout(old_tree_ish) if tree_ish
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.