Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
prep deploy 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Jan 25, 2018
1 parent ab138bf commit f84dc5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ jobs:

- stage: *releaseStage
node_js: *latest_tested
install: true
script: node ./build/version-is-tampered-with.js --echo --exit
before_script: npm run build -- --sourceMap false
before_deploy:
- node ./build/set-badges-branch.js
- npm install
- npm run build -- --sourceMap false
- npm install -g doctoc@^1.3.0
- doctoc --github README.md
deploy:
- provider: npm
on:
Expand Down
8 changes: 8 additions & 0 deletions build/set-badges-branch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const version = require('../package').version;
const fs = require('fs');
const readmePath = require('path').resolve(__dirname, '../README.md');

const readmeContents = fs.readFileSync(readmePath, 'utf8')
.replace(/\?branch=master/g, `?branch=${version}`);

fs.writeFileSync(readmePath, readmeContents);

0 comments on commit f84dc5c

Please sign in to comment.