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

Remove the apack.info.

上级 4bef7b5c
No related branches found
No related tags found
无相关合并请求
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
pretty-quick --staged && src-script/featurelevel-check.js && jsdoc src-electron src-shared -r -d ./generated-html/ && eslint --ext .js,.vue src src-electron src-shared src-script test
pretty-quick --staged && jsdoc src-electron src-shared -r -d ./generated-html/ && eslint --ext .js,.vue src src-electron src-shared src-script test
......@@ -53,16 +53,6 @@ pipeline
}
}
}
stage('Feature level check')
{
steps
{
script
{
sh 'npm run featurelevel'
}
}
}
stage('Outdated packages report')
{
steps
......
# Adapter pack file for Studio.
#
label=Zigbee Cluster Configurator
description=Graphical configuration tool for application and libraries based on Zigbee Cluster Library.
path=.,node_modules/.bin/,ZAP.app/Contents/MacOS
requiredFeatureLevel=apack.core:9
featureLevel=35
id=zclConfigurator
# Trigger file extension. No period.
uc.triggerExtension=zap
executable(zap:win32.x86_64) {
exe=zap.exe
optional=true
}
executable(zap:linux.x86_64) {
exe=zap
optional=true
}
executable(zap:macosx.x86_64) {
exe=zap.app/Contents/MacOS/zap
optional=true
}
executable(zap) {
engine=node
optional=true
exe=src-script/zap-start.js
}
function(ui:uc_cli) {
cmd=$(zap)
}
function(selfcheck:uc_cli) {
cmd=$(zap) selfCheck
}
function(version:uc_cli) {
cmd=$(zap) --version
}
function(uc_generate) {
cmd=$(zap) generate --noUi --noServer -o ${generationOutput} --zcl ${sdkRoot}/app/zcl/zcl-zap.json --generationTemplate ${sdkRoot}/protocol/zigbee/app/framework/gen-template/gen-templates.json --in ${contentFolder}
}
function(zapHelp) {
cmd=$(zap) --help
}
function(zapSelfcheck) {
cmd=$(zap) selfCheck
}
function(zapServer) {
cmd=$(zap) server --reuseZapInstance --zcl ${sdkRoot}/app/zcl/zcl-zap.json --generationTemplate ${sdkRoot}/protocol/zigbee/app/framework/gen-template/gen-templates.json --studioHttpPort ${studioHttpPort}
}
function(zapStop) {
cmd=$(zap) stop --reuseZapInstance
}
function(zapStatus) {
cmd=$(zap) status --reuseZapInstance
}
function(zapServerNoSdk) {
cmd=$(zap) server --reuseZapInstance --studioHttpPort ${studioHttpPort}
}
function(zapFull) {
cmd=$(zap) --showUrl --zcl ${sdkRoot}/app/zcl/zcl-zap.json
}
......@@ -15,7 +15,6 @@
"main": "src-electron/main-process/electron-main.js",
"scripts": {
"lic": "node src-script/license-check.js --production",
"featurelevel": "node src-script/featurelevel-check.js",
"lint": "eslint --ext .js,.vue src src-electron src-shared src-script test",
"lintfix": "eslint --fix --ext .js,.vue src src-electron src-shared src-script test",
"electron-build-dmg": "node src-script/build-dmg.js",
......
#!/usr/bin/env node
/**
*
* Copyright (c) 2020 Silicon Labs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('path')
const fs = require('fs')
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()
const lookFor = 'featureLevel='
let i = data.indexOf(lookFor)
let j = data.indexOf('\n', i + lookFor.length)
let slice = data.slice(i + lookFor.length, j)
let featureLevelInApackInfo = parseInt(slice)
if (featureLevelInApackInfo != featureLevelInApackJson) {
console.log(
`⛔ Feature level missmatch:
${featureLevelInApackInfo} ← apack.info
${featureLevelInApackJson} ← apack.json
Please make sure all feature levels are the same.`
)
process.exit(1)
} else {
console.log(`😎 Feature level check: ${featureLevelInApackInfo}`)
process.exit(0)
}
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册