1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-07 01:07:13 +02:00

chore(docs site): use git commit message for netlify build (#4900)

This commit is contained in:
Gary Katsevman
2018-01-24 13:47:07 -05:00
committed by GitHub
parent 673c231684
commit ddfaf14b00
3 changed files with 20 additions and 1066 deletions

View File

@ -1,16 +1,12 @@
const sh = require('shelljs'); const sh = require('shelljs');
const semver = require('semver');
const GIT_CONTAINS = `git tag --contains ${process.env.COMMIT_REF}`; const GIT_LOG = `git log --format=%B -n 1 ${process.env.COMMIT_REF}`;
const output = sh.exec(GIT_CONTAINS, {async: false, silent:true}).stdout; const output = sh.exec(GIT_LOG, {async: false, silent:true}).stdout;
console.log('CONTAINS command:', GIT_CONTAINS);
console.log('BRANCH:', process.env.BRANCH);
console.log('OUTPUT', output);
// if we're on master branch and not on a tagged commit, // if we're on master branch and not on a tagged commit,
// error the build so it doesn't redeploy the docs // error the build so it doesn't redeploy the docs
if (process.env.BRANCH === 'master' && output === '') { if (process.env.BRANCH === 'master' && semver.valid(output.trim()) === null) {
process.exit(1); process.exit(1);
// if we're on any other branch, we can regenerate docs // if we're on any other branch, we can regenerate docs

1073
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -140,6 +140,7 @@
"rollup-plugin-progress": "^0.2.1", "rollup-plugin-progress": "^0.2.1",
"rollup-plugin-uglify": "^1.0.2", "rollup-plugin-uglify": "^1.0.2",
"rollup-watch": "^4.0.0", "rollup-watch": "^4.0.0",
"semver": "^5.5.0",
"shelljs": "^0.8.1", "shelljs": "^0.8.1",
"sinon": "^1.16.1", "sinon": "^1.16.1",
"time-grunt": "^1.1.1", "time-grunt": "^1.1.1",