Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow same version when building npm package on Circle #5601

Merged
merged 3 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ install:
- node --version
- node --print process.arch
- npm --version
- npm run check-next-dev-version
# prints all public variables relevant to the build
- print-env Platform
- npm run check-node-version
Expand Down
5 changes: 3 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,10 @@ jobs:
steps:
- attach_workspace:
at: ~/
- run: npm run check-next-dev-version
- run:
name: bump NPM version
command: npm --no-git-tag-version version ${NEXT_DEV_VERSION:-0.0.0-development}
command: npm --no-git-tag-version --allow-same-version version ${NEXT_DEV_VERSION:-0.0.0-development}
- run:
name: build NPM package
working_directory: cli
Expand Down Expand Up @@ -1121,7 +1122,7 @@ mac-workflow: &mac-workflow
branches:
only:
- develop

- lint:
name: Mac lint
executor: mac
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"bump": "node ./scripts/binary.js bump",
"check-deps": "node ./scripts/check-deps.js --verbose",
"check-deps-pre": "node ./scripts/check-deps.js --verbose --prescript",
"check-next-dev-version": "node scripts/check-next-dev-version.js",
"check-node-version": "node scripts/check-node-version.js",
"check-terminal": "node scripts/check-terminal.js",
"clean-deps": "npm run all clean-deps && rm -rf node_modules",
Expand Down
14 changes: 14 additions & 0 deletions scripts/check-next-dev-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable no-console */
if (!process.env.NEXT_DEV_VERSION) {
console.log('NEXT_DEV_VERSION is not set')
process.exit(0)
}

const currentVersion = require('../package.json').version

if (currentVersion === process.env.NEXT_DEV_VERSION) {
console.warn('⚠️ NEXT_DEV_VERSION is set to the same value as current package.json version "%s"', currentVersion)
process.exit(0)
}

console.log('NEXT_DEV_VERSION is different from the current package version "%s"', currentVersion)