summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-08-13 03:03:38 -0600
committerDan Allen <dan.j.allen@gmail.com>2017-08-13 03:03:38 -0600
commit10abf35ddc3ede4eccea60132a7c1fb7000c4280 (patch)
tree9dceda3b066a5d927a07e731e57f7b8b16a072f6
parent9aae054929bf10ae4f00f8e6174571656898efd4 (diff)
fix dependent builds task
-rw-r--r--Rakefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Rakefile b/Rakefile
index 6c970c38..eb5e73ed 100644
--- a/Rakefile
+++ b/Rakefile
@@ -148,6 +148,7 @@ desc 'Trigger builds for all dependent projects on Travis CI'
).each do |project|
org, name, branch = project.split '/', 3
branch ||= 'master'
+ project = [org, name, branch] * '/'
header = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
@@ -155,14 +156,14 @@ desc 'Trigger builds for all dependent projects on Travis CI'
'Authorization' => %(token #{token})
}
if (commit_hash = ENV['TRAVIS_COMMIT'])
- commit_memo = %( (#{commit_hash.slice 0, 8})\\n\\nhttps://github.com/#{ENV['TRAVIS_REPO_SLUG'] || 'asciidoctor/asciidoctor'}/commit/#{commit_hash})
+ commit_memo = %( (#{commit_hash.slice 0, 8})\n\nhttps://github.com/#{ENV['TRAVIS_REPO_SLUG'] || 'asciidoctor/asciidoctor'}/commit/#{commit_hash})
end
config = YAML.load open(%(https://raw.githubusercontent.com/#{project}/.travis-upstream-only.yml')) {|fd| fd.read } rescue {}
payload = {
- request: {
- branch: branch,
- message: %(Build triggered by Asciidoctor#{commit_memo}),
- config: config
+ 'request' => {
+ 'branch' => branch,
+ 'message' => %(Build triggered by Asciidoctor#{commit_memo}),
+ 'config' => config
}
}.to_json
(http = Net::HTTP.new 'api.travis-ci.org', 443).use_ssl = true