summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-07-14 16:35:54 -0600
committerDan Allen <dan.j.allen@gmail.com>2017-07-14 16:35:54 -0600
commitd96be2f6388ceae95203be58eb85228556fa9169 (patch)
treef9938ba3a27f7d496f69e05b844d687365925d9d /Rakefile
parent8e2f4ab25821b429c2f9fc66bdca54a212f6e587 (diff)
add commit memo to message used for triggered build
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 29ee0d2c..b4b90d35 100644
--- a/Rakefile
+++ b/Rakefile
@@ -146,7 +146,10 @@ desc 'Trigger builds for all dependent projects on Travis CI'
'Travis-API-Version' => '3',
'Authorization' => %(token #{token})
}
- payload = '{ "request": { "branch": "master", "message": "Build triggered by change to Asciidoctor core" } }'
+ if (commit_hash = ENV['TRAVIS_COMMIT'])
+ commit_memo = %( (#{commit_hash}))
+ end
+ payload = %({ "request": { "branch": "master", "message": "Build triggered by change to 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