whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 5fead17: git branch support
Date Wed, 09 Mar 2016 17:48:42 GMT
Commit 5fead17c377447297404c552972d0bdac154643e:
    git branch support


Branch: refs/heads/reuse-auth-parser
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
Rakefile                                                     | +++++++ -
repository.yml                                               | + 
------------------------------------------------------------
9 changes: 8 additions, 1 deletions.
------------------------------------------------------------


diff --git a/Rakefile b/Rakefile
index 6d21450..f83ed8e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -100,12 +100,18 @@ namespace :git do
         require 'uri'
         base = URI.parse('git://git.apache.org/')
         repository[:git].each do |name, description|
+          branch = description['branch']
+
           puts
           puts File.join(Dir.pwd, name)
           if Dir.exist? name
-            Dir.chdir(name) {system 'git pull'}
+            Dir.chdir(name) do
+              system "git checkout #{branch}" if branch
+              system 'git pull'
+            end
           else
             system 'git', 'clone', (base + description['url']).to_s, name
+            Dir.chdir(name) {system "git checkout #{branch}"} if branch
           end
         end
       end
diff --git a/repository.yml b/repository.yml
index 5c5bbef..03942d4 100644
--- a/repository.yml
+++ b/repository.yml
@@ -3,6 +3,7 @@
 
   infrastructure-puppet:
     url: infrastructure-puppet.git
+    branch: deployment
 
 :svn:
 

Mime
View raw message