summaryrefslogtreecommitdiffstats
path: root/tasks/rake
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-09-17 12:47:27 +1000
committerJames Turnbull <james@lovedthanlost.net>2009-09-17 12:47:27 +1000
commit2283605ba63b39deec30bd71b5d0879630f63e6d (patch)
treebd574429f9eaad7b5a5635e7c8dd665369f181a6 /tasks/rake
parentfd2a1904f61c8dc1d47445833a91e365bd8ab708 (diff)
downloadpuppet-2283605ba63b39deec30bd71b5d0879630f63e6d.tar.gz
puppet-2283605ba63b39deec30bd71b5d0879630f63e6d.tar.xz
puppet-2283605ba63b39deec30bd71b5d0879630f63e6d.zip
Added automatically constructed test branch task and file
Diffstat (limited to 'tasks/rake')
-rw-r--r--tasks/rake/testbranch.rake16
1 files changed, 16 insertions, 0 deletions
diff --git a/tasks/rake/testbranch.rake b/tasks/rake/testbranch.rake
new file mode 100644
index 000000000..62304ea0e
--- /dev/null
+++ b/tasks/rake/testbranch.rake
@@ -0,0 +1,16 @@
+desc "Rebuild the 'test' branch"
+task :testbranch do
+ TEST_SERIES = %x{git config --get puppet.testseriesfile}.chomp
+
+ sh 'git checkout master'
+ if %x{git branch}.split("\n").detect { |l| l =~ /\s+test$/ }
+ sh 'git branch -D test'
+ end
+ sh 'git checkout -b test'
+ File.readlines(TEST_SERIES).each do |line|
+ line.chomp!
+
+ # Always create a commit for our merge
+ sh "git merge --no-ff #{line}"
+ end
+end