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

Allow version stamp skipping and local pkg install. (#876)

* Add temporary target used to test with local fork of pkg.

* Honor ZAP_SKIP_REAL_VERSION environment variable.
上级 cf7581e4
No related branches found
No related tags found
无相关合并请求
......@@ -107,6 +107,7 @@
"pack:cli:mac": "node ./src-script/pack-cli.js -p mac",
"pkg": "npx pkg --out-path dist/ --compress GZip --options max-old-space-size=4096 .",
"pkg:linux": "npx pkg -t node16-linux-x64 --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg-use-local-fork": "node ../pkg/lib-es5/bin.js -t node16-linux-x64 --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg:win": "npx pkg -t node16-win-x64 --output dist/zap-win.exe --compress GZip --options max-old-space-size=4096 .",
"pkg:mac": "npx pkg -t node16-macos-x64 --output dist/zap-macos --compress GZip --options max-old-space-size=4096 .",
"mattersdk": "node src-script/zap-start.js regenerateSdk --sdk ~/git/matter/scripts/tools/sdk.json",
......
......@@ -216,6 +216,12 @@ async function stampVersion() {
* @param {*} mode 'fake', 'real' or 'print'
*/
async function setPackageJsonVersion(date, mode) {
if (process.env.ZAP_SKIP_REAL_VERSION != null) {
// If you set ZAP_SKIP_REAL_VERSION environment variable, then this whole
// version muddling is turned off.
return true
}
let promise = new Promise((resolve, reject) => {
let packageJson = path.join(__dirname, '../package.json')
let output = ''
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册