summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Panzer <Robert.Panzer.PB@googlemail.com>2017-07-17 09:49:24 +0200
committerDan Allen <dan.j.allen@gmail.com>2017-07-17 01:49:24 -0600
commit0a3f90a494e19241abd2cf2e407ec7ecb0893cd7 (patch)
tree89f0826721c3f4792db8b671daaec7705714f8ce
parent4c3b4115e564da723ee1c268ceb6a03bfa132cc0 (diff)
Trigger build of branch asciidoctorj-1.6.0 on updates (PR #2317)
-rw-r--r--Rakefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index a3dad8ea..913c829d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -138,8 +138,10 @@ desc 'Trigger builds for all dependent projects on Travis CI'
%w(
asciidoctor/asciidoctor.js
asciidoctor/asciidoctorj
+ asciidoctor/asciidoctorj/asciidoctorj-1.6.0
).each do |project|
- org, name = project.split '/', 2
+ org, name, branch = project.split '/', 3
+ branch ||= 'master'
header = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
@@ -149,7 +151,7 @@ desc 'Trigger builds for all dependent projects on Travis CI'
if (commit_hash = ENV['TRAVIS_COMMIT'])
commit_memo = %( (#{commit_hash})\\n\\nhttps://github.com/#{ENV['TRAVIS_REPO_SLUG'] || 'asciidoctor/asciidoctor'}/commit/#{commit_hash})
end
- payload = %({ "request": { "branch": "master", "message": "Build triggered by Asciidoctor#{commit_memo}" } })
+ payload = %({ "request": { "branch": "#{branch}", "message": "Build triggered by Asciidoctor#{commit_memo}" } })
(http = Net::HTTP.new 'api.travis-ci.org', 443).use_ssl = true
request = Net::HTTP::Post.new %(/repo/#{org}%2F#{name}/requests), header
request.body = payload