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

Commit f84dc5c

Browse files
committed
prep deploy 1.1.0
1 parent ab138bf commit f84dc5c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,14 @@ jobs:
6565

6666
- stage: *releaseStage
6767
node_js: *latest_tested
68+
install: true
6869
script: node ./build/version-is-tampered-with.js --echo --exit
69-
before_script: npm run build -- --sourceMap false
70+
before_deploy:
71+
- node ./build/set-badges-branch.js
72+
- npm install
73+
- npm run build -- --sourceMap false
74+
- npm install -g doctoc@^1.3.0
75+
- doctoc --github README.md
7076
deploy:
7177
- provider: npm
7278
on:

build/set-badges-branch.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const version = require('../package').version;
2+
const fs = require('fs');
3+
const readmePath = require('path').resolve(__dirname, '../README.md');
4+
5+
const readmeContents = fs.readFileSync(readmePath, 'utf8')
6+
.replace(/\?branch=master/g, `?branch=${version}`);
7+
8+
fs.writeFileSync(readmePath, readmeContents);

0 commit comments

Comments
 (0)