Skip to content

Commit 7eb9815

Browse files
4.1 gulp set version fix (#598)
* fixed gulp set --version the --version and -v is gulp specific arguments and cant be used for task arguments. changed the argument to --x old: gulp set --version 4.0.0 new: gulp set --x 4.0.0 * fixed the npm run versionRelease command to use new gulp set command script that updates 'src/version.js' and package.json' VERSION=$VERSION npm run versionRelease
1 parent 88e646d commit 7eb9815

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

gulpfile.babel.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ gulp.task(
153153

154154
/** Set the project version, controls package.json and version.js */
155155
gulp.task('set', function () {
156-
// Get the --version arg from command line
157-
const version = minimist(process.argv.slice(2), { string: 'version' }).version
156+
// example: gulp set --x 4.0.2
157+
158+
// Get the --x arg from command line
159+
const command = minimist(process.argv.slice(2), { string: 'x' })
160+
const version = command.x
158161

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "neo4j-driver",
3-
"version": "2.0.0-dev",
4-
"description": "Connect to Neo4j 3.0.0 and up from JavaScript",
3+
"version": "4.0.0-dev",
4+
"description": "Connect to Neo4j 3.4.0 and up from JavaScript",
55
"author": "Neo4j",
66
"license": "Apache-2.0",
77
"repository": {
@@ -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

Lines changed: 2 additions & 1 deletion
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)