Skip to content
代码片段 群组 项目
提交 e61ca1ec 编辑于 作者: Timotej Ecimovic's avatar Timotej Ecimovic
浏览文件

Update feature level checker for a triplication, until this all collapses into...

Update feature level checker for a triplication, until this all collapses into a single source apack.json.
上级 c0e73645
No related branches found
No related tags found
无相关合并请求
......@@ -22,6 +22,9 @@ const fs = require('fs')
let packageJson = path.join(__dirname, '../package.json')
let featureLevelInPackageJson = JSON.parse(fs.readFileSync(packageJson))
.featureLevel
let apackJson = path.join(__dirname, '../apack.json')
let featureLevelInApackJson = JSON.parse(fs.readFileSync(apackJson))
.featureLevel
let apackInfo = path.join(__dirname, '../apack.info')
let data = fs.readFileSync(apackInfo).toString()
......@@ -31,9 +34,16 @@ let j = data.indexOf('\n', i + lookFor.length)
let slice = data.slice(i + lookFor.length, j)
let featureLevelInApackInfo = parseInt(slice)
if (featureLevelInApackInfo != featureLevelInPackageJson) {
if (
featureLevelInApackInfo != featureLevelInPackageJson ||
featureLevelInApackInfo != featureLevelInApackJson
) {
console.log(
`⛔ Feature level missmatch: ${featureLevelInApackInfo} in apack.info vs ${featureLevelInPackageJson} in package.json. Please make sure both apack.info and package.json have the same feature level.`
`⛔ Feature level missmatch:
${featureLevelInApackInfo} ← apack.info
${featureLevelInPackageJson} ← package.json
${featureLevelInApackJson} ← apack.json
Please make sure all feature levels are the same.`
)
process.exit(1)
} else {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册