1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00
video.js/build/version.js
Gary Katsevman 6d876ee6ef chore: 6.x build updates (#4228)
This runs the changelog generation on versioning automatically, if it isn't a pre-release.
It also runs the build and API docs generation on publish and makes sure that the generated API docs are in the published package.
2017-03-24 18:42:39 -04:00

21 lines
438 B
JavaScript

var safeParse = require("safe-json-parse/tuple");
var tuple = safeParse(process.env.npm_config_argv);
var npm_config_argv = tuple[1]
if (tuple[0]) {
process.exit(1);
}
var sh = require('shelljs');
var version = process.env.npm_package_version;
var prereleaseType = npm_config_argv['remain'][0];
var approvedTypes = {
'major': 1,
'minor': 1,
'patch': 1
}
if (prereleaseType in approvedTypes) {
sh.exec('npm run changelog');
}