Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Ian White authored February 08, 2009
5  History.txt
... ...
@@ -1,3 +1,8 @@
  1
+== 0.1.8
  2
+
  3
+* 1 bugfix
  4
+  * fix problem where dependencies weren't checking out repo tags or branches properly
  5
+
1 6
 == 0.1.7
2 7
 
3 8
 * 2 minor enhancement
6  garlic.gemspec
... ...
@@ -1,12 +1,12 @@
1 1
 # -*- encoding: utf-8 -*-
2  
-#
  2
+
3 3
 Gem::Specification.new do |s|
4 4
   s.name = %q{garlic}
5  
-  s.version = "0.1.7"
  5
+  s.version = "0.1.8"
6 6
 
7 7
   s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8 8
   s.authors = ["Ian White"]
9  
-  s.date = %q{2009-01-22}
  9
+  s.date = %q{2009-02-08}
10 10
   s.default_executable = %q{garlic}
11 11
   s.description = %q{Set of commands/rake-tasks for CI against multiple version of rails/deps.}
12 12
   s.email = %q{ian.w.white@gmail.com}
2  lib/garlic.rb
@@ -11,7 +11,7 @@ module Garlic
11 11
   module Version
12 12
     Major = 0
13 13
     Minor = 1
14  
-    Tiny  = 7
  14
+    Tiny  = 8
15 15
     
16 16
     String = [Major, Minor, Tiny].join('.')
17 17
   end
18  lib/garlic/target.rb
@@ -78,25 +78,17 @@ def install_dependency(repo, install_path = ".", options = {}, &block)
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
     

0 notes on commit bb09440

Please sign in to comment.
Something went wrong with that request. Please try again.