Commit 1038c80 1 parent c380339 commit 1038c80 Copy full SHA for 1038c80
File tree 4 files changed +17
-13
lines changed
4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ install:
53
53
- node --version
54
54
- node --print process.arch
55
55
- npm --version
56
+ - npm run check-next-dev-version
56
57
# prints all public variables relevant to the build
57
58
- print-env Platform
58
59
- npm run check-node-version
Original file line number Diff line number Diff line change @@ -714,19 +714,7 @@ jobs:
714
714
steps :
715
715
- attach_workspace :
716
716
at : ~/
717
- - run :
718
- name : show current NPM package version
719
- command : grep \"version\" package.json
720
- - run :
721
- name : show next NPM package version to build
722
- command : |
723
- set -e
724
- if [ -z "$NEXT_DEV_VERSION" ]; then
725
- echo "env variable NEXT_DEV_VERSION is not set";
726
- else
727
- echo "env variable NEXT_DEV_VERSION is set to '$NEXT_DEV_VERSION'";
728
- fi
729
- echo "Generally next dev version should be different from the current version"
717
+ - run : npm run check-next-dev-version
730
718
- run :
731
719
name : bump NPM version
732
720
command : npm --no-git-tag-version --allow-same-version version ${NEXT_DEV_VERSION:-0.0.0-development}
Original file line number Diff line number Diff line change 17
17
"bump" : " node ./scripts/binary.js bump" ,
18
18
"check-deps" : " node ./scripts/check-deps.js --verbose" ,
19
19
"check-deps-pre" : " node ./scripts/check-deps.js --verbose --prescript" ,
20
+ "check-next-dev-version" : " node scripts/check-next-dev-version.js" ,
20
21
"check-node-version" : " node scripts/check-node-version.js" ,
21
22
"check-terminal" : " node scripts/check-terminal.js" ,
22
23
"clean-deps" : " npm run all clean-deps && rm -rf node_modules" ,
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-console */
2
+ if ( ! process . env . NEXT_DEV_VERSION ) {
3
+ console . log ( 'NEXT_DEV_VERSION is not set' )
4
+ process . exit ( 0 )
5
+ }
6
+
7
+ const currentVersion = require ( '../package.json' ) . version
8
+
9
+ if ( currentVersion === process . env . NEXT_DEV_VERSION ) {
10
+ console . warn ( '⚠️ NEXT_DEV_VERSION is set to the same value as current package.json version' )
11
+ process . exit ( 0 )
12
+ }
13
+
14
+ console . log ( 'NEXT_DEV_VERSION is different from the current package version "%s"' , currentVersion )
You can’t perform that action at this time.
0 commit comments