Skip to content

Commit

Permalink
chore: ci test and trying sauce
Browse files Browse the repository at this point in the history
  • Loading branch information
imcuttle committed Feb 23, 2018
1 parent 3e1f7db commit a6d41ea
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ lib/
**/.DS_Store
public/
packages/
release_notes/
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ before_script:
- npm install codecov
script:
- npm test
- npm run test:cy:ci $CYPRESS_RECORD_KEY
after_script:
- codecov --token=$CODECOV_TOKEN

Expand All @@ -27,3 +28,8 @@ deploy:
github_token: ${GH_TOKEN} # Set in travis-ci.org dashboard
local_dir: public
# repo: $GH_REF

addons:
sauce_connect:
username: imcuttle
access_key: ${SAUCE_ACCESS}
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
module.exports = { extends: ['@commitlint/config-conventional'] }
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"lint": "eslint ./src --fix",
"precommit": "lint-staged",
"commitmsg": "commitlint -e $GIT_PARAMS",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
"gen-release-note": "node scripts/gen-release-notes.js",
"version": "run-p changelog gen-release-note"
},
"lint-staged": {
"src/**/*.{js,jsx}": [
Expand Down
16 changes: 16 additions & 0 deletions scripts/gen-release-notes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const version = require('../package.json').version
const cc = require('conventional-changelog')
const file = `./release_notes/RELEASE_NOTE${version ? `_${version}` : ''}.md`
const fileStream = require('fs').createWriteStream(file)

cc({
preset: 'angular',
pkg: {
transform (pkg) {
pkg.version = `v${version}`
return pkg
}
}
}).pipe(fileStream).on('close', () => {
console.log(`Generated release note at ${file}`)
})

0 comments on commit a6d41ea

Please sign in to comment.