diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 8b380e74c..015a66a46 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -140,8 +140,11 @@ gulp.task( /** Set the project version, controls package.json and version.js */ gulp.task('set', function () { - // Get the --version arg from command line - const version = minimist(process.argv.slice(2), { string: 'version' }).version + // example: gulp set --x 1.7.7 + + // Get the --x arg from command line + const command = minimist(process.argv.slice(2), { string: 'x' }) + const version = command.x if (!semver.valid(version)) { throw new Error(`Invalid version "${version}"`) diff --git a/package.json b/package.json index 3e7151095..650153f64 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "run-stress-tests": "gulp run-stress-tests", "run-ts-declaration-tests": "gulp run-ts-declaration-tests", "docs": "esdoc -c esdoc.json", - "versionRelease": "gulp set --version $VERSION && npm version $VERSION --no-git-tag-version", + "versionRelease": "gulp set --x $VERSION && npm version $VERSION --no-git-tag-version", "browser": "gulp browser && gulp test-browser" }, "husky": { diff --git a/src/version.js b/src/version.js index c16371d61..ed6f2bd58 100644 --- a/src/version.js +++ b/src/version.js @@ -19,7 +19,8 @@ // DO NOT CHANGE THE VERSION BELOW HERE // This is set by the build system at release time, using -// gulp set --version +// +// gulp set --x // // This is set up this way to keep the version in the code in // sync with the npm package version, and to allow the build