summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-07-20 18:48:04 -0600
committerDan Allen <dan.j.allen@gmail.com>2017-07-20 18:48:04 -0600
commit153dd5593cb7d9d2c7d17c42c0d3531adbb568b5 (patch)
tree161fce20f0422b3e21c3a35daaccf8ddd731eadc /Rakefile
parent11eaf590d4ed2eceb5003e94de69791f025736d2 (diff)
abbreviate sha1 hash in message for triggered builds
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index f3b7996a..a4966064 100644
--- a/Rakefile
+++ b/Rakefile
@@ -150,7 +150,7 @@ desc 'Trigger builds for all dependent projects on Travis CI'
'Authorization' => %(token #{token})
}
if (commit_hash = ENV['TRAVIS_COMMIT'])
- commit_memo = %( (#{commit_hash})\\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
payload = %({ "request": { "branch": "#{branch}", "message": "Build triggered by Asciidoctor#{commit_memo}" } })
(http = Net::HTTP.new 'api.travis-ci.org', 443).use_ssl = true