summaryrefslogtreecommitdiff
path: root/tasks/rake/testbranch.rake
blob: fd97f6154d9addfa0afa5e1795852114e905b667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
desc "Rebuild the 'testng' 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+testing$/ }
        sh 'git branch -D testing'
    end
    sh 'git checkout -b testing'
    File.readlines(TEST_SERIES).each do |line|
        line.chomp!

        # Always create a commit for our merge
        sh "git merge --no-ff #{line}"
    end
end