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 version stamp skipping and local pkg install. #876

Merged
merged 2 commits into from
Jan 4, 2023
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions src-script/script-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down