Skip to content

Commit c4d290c

Browse files
committed
Make and travis: basic setup
Signed-off-by: Vincent Batts <[email protected]>
1 parent 91d6d84 commit c4d290c

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
language: ruby
2-
rvm: 2.4
3-
cache: bundler
4-
before_script:
5-
- gem install awesome_bot
1+
before_install:
2+
- make install.tools
3+
4+
install: true
5+
66
script:
7-
- awesome_bot --skip-save-results --allow-redirect --allow-dupe -w pullapprove,example.com spec.md
7+
- echo "${TRAVIS_COMMIT_RANGE} -> ${TRAVIS_COMMIT_RANGE/.../..} (travis-ci/travis-ci#4596)"
8+
- TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make .gitvalidation

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
EPOCH_TEST_COMMIT := 91d6d8466e68f1efff7977b63ad6f48e72245e05
2+
3+
test: .gitvalidation
4+
5+
# When this is running in travis, it will only check the travis commit range
6+
.gitvalidation:
7+
@command -v git-validation >/dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false)
8+
ifdef TRAVIS_COMMIT_RANGE
9+
git-validation -q -run DCO,short-subject,dangling-whitespace
10+
else
11+
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
12+
endif
13+
14+
install.tools: .install.gitvalidation
15+
16+
.install.gitvalidation:
17+
go get -u github.com/vbatts/git-validation

0 commit comments

Comments
 (0)