Skip to content

Commit

Permalink
chore: tweaks to commit linting
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed May 3, 2017
1 parent ac820c8 commit a0914d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_js:
before_install:
- git fetch --unshallow
before_script:
- npm run lint:prcommits
- npm run build
script:
- npm run travis:lint:commits
- npm test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"pretest": "npm run deps",
"test": "ava",
"lint": "xo *.js",
"lint:prcommits": "./scripts/lint-prcommits.sh",
"deps": "npm run build && dependency-check . --missing && dependency-check . --extra --no-dev -i conventional-changelog-angular -i conventional-changelog-lint-config-angular",
"commitlint": "node distribution/cli.js --from=HEAD~1",
"preversion": "npm run build && npm test",
"release": "npm version --no-git-tag-version $(conventional-recommended-bump -p angular)",
"version": "npm run changelog && git add .",
"postversion": "git commit -m \"chore(release): v$npm_package_version\n$(conventional-changelog -p angular)\" && git tag -a v$npm_package_version -m \"$(conventional-changelog -p angular)\""
"postversion": "git commit -m \"chore(release): v$npm_package_version\n$(conventional-changelog -p angular)\" && git tag -a v$npm_package_version -m \"$(conventional-changelog -p angular)\"",
"travis:lint:commits": "./scripts/lint:commits.sh"
},
"ava": {
"babel": "inherit",
Expand Down
10 changes: 5 additions & 5 deletions scripts/lint-prcommits.sh → scripts/lint:commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ else
TO="$TRAVIS_PULL_REQUEST_BRANCH"
fi

if [[ $TRAVIS_BRANCH == $TO ]]; then
conventional-changelog-lint --from="HEAD~1"
else
conventional-changelog-lint --from="$TRAVIS_BRANCH" --to="$TO"
fi
# Lint all commits in the PR
conventional-changelog-lint --from="$TRAVIS_BRANCH" --to="$TO"

# Always lint the triggerig commit
conventional-changelog-lint --from="$TRAVIS_COMMIT"

0 comments on commit a0914d1

Please sign in to comment.