Skip to content

Commit d97ff5f

Browse files
authored
Merge pull request #10 from k0kubun/ci-commit-email
Test commit-email.rb on Travis
2 parents 31d37fd + 2aac143 commit d97ff5f

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.travis.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
language: ruby
22
rvm:
3-
- 2.6
3+
- 2.1 # git.ruby-lang.org is debian 8 (jessie), ruby 2.1.5p273
44
branches:
55
only:
66
- master
77
before_install:
88
- gem install test-unit
9+
- git clone --depth=3 https://github.com/ruby/ruby
10+
11+
# Install dummy `sendmail` for testing commit-email.rb
12+
- |-
13+
echo "#!/usr/bin/env ruby
14+
p ARGV
15+
puts STDIN.read" > ./sendmail
16+
chmod +x ./sendmail
17+
sudo mv ./sendmail /usr/sbin/sendmail
18+
919
script:
1020
- "ruby -Ilib -rtest/unit test/test_*.rb"
21+
- |-
22+
cd ./ruby &&
23+
../bin/commit-email.rb ./ [email protected] \
24+
$(git rev-parse HEAD^) $(git rev-parse HEAD) refs/heads/trunk \
25+
-I ./lib \
26+
--name Ruby \
27+
--viewer-uri "https://git.ruby-lang.org/ruby.git/commit/?id=" \
28+
-r https://svn.ruby-lang.org/repos/ruby \
29+
--rss-path /tmp/ruby.rdf \
30+
--rss-uri https://svn.ruby-lang.org/rss/ruby.rdf \
31+
--error-to [email protected] \
32+
--vcs git

bin/commit-email.rb

+1
Original file line numberDiff line numberDiff line change
@@ -522,4 +522,5 @@ def main(repo_path, to, rest)
522522
#{$!.class}: #{$!.message}
523523
#{$@.join("\n")}
524524
MAIL
525+
exit 1
525526
end

0 commit comments

Comments
 (0)