Skip to content

Commit ab0288f

Browse files
fixed gulp set issue (#601)
1 parent 0a2717d commit ab0288f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

gulpfile.babel.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,11 @@ gulp.task(
140140

141141
/** Set the project version, controls package.json and version.js */
142142
gulp.task('set', function () {
143-
// Get the --version arg from command line
144-
const version = minimist(process.argv.slice(2), { string: 'version' }).version
143+
// example: gulp set --x 1.7.7
144+
145+
// Get the --x arg from command line
146+
const command = minimist(process.argv.slice(2), { string: 'x' })
147+
const version = command.x
145148

146149
if (!semver.valid(version)) {
147150
throw new Error(`Invalid version "${version}"`)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"run-stress-tests": "gulp run-stress-tests",
1919
"run-ts-declaration-tests": "gulp run-ts-declaration-tests",
2020
"docs": "esdoc -c esdoc.json",
21-
"versionRelease": "gulp set --version $VERSION && npm version $VERSION --no-git-tag-version",
21+
"versionRelease": "gulp set --x $VERSION && npm version $VERSION --no-git-tag-version",
2222
"browser": "gulp browser && gulp test-browser"
2323
},
2424
"husky": {

src/version.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
// DO NOT CHANGE THE VERSION BELOW HERE
2121
// This is set by the build system at release time, using
22-
// gulp set --version <releaseversion>
22+
//
23+
// gulp set --x <releaseversion>
2324
//
2425
// This is set up this way to keep the version in the code in
2526
// sync with the npm package version, and to allow the build

0 commit comments

Comments
 (0)