allow same version when building npm package on Circle (#5601)

* allow same version when building npm package on Circle

* check next dev version from node script

* print current package version for complete info
This commit is contained in:
Gleb Bahmutov
2019-11-06 12:51:58 -05:00
committed by Jennifer Shehane
parent a57dfa6927
commit 8e309e9bca
4 changed files with 19 additions and 2 deletions

View File

@@ -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)