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

ZAPP-1183 added clean script to build release packages #1444

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

dhchandw
Copy link
Collaborator

@dhchandw dhchandw commented Oct 9, 2024

  • added clean script to build release packages

  • script can be used in CI and locally

  • modified instructions to build binaries locally

  • modified release workflow to use build-release-package.js script

* added clean script to build release packages

* script can be used in CI and locally

* modified instructions to build binaries locally

* modified release workflow to use build-release-package.js script
@dhchandw dhchandw changed the title added clean script to build release packages ZAPP-1183 added clean script to build release packages Oct 10, 2024
npm run pkg:win
ls ./dist/
npm run pack:cli:win
node src-script/build-release-package.js --platform w
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which version of node gets pulled in here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set by the workflow script in the setup phase.

@@ -0,0 +1,143 @@
#!/usr/bin/env node
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my own recollection. Forgot what this was. Why do we do this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/usr/bin/env node is an instance of a shebang line: the very first line in an executable plain-text file on Unix-like platforms that tells the system what interpreter to pass that file to for execution, via the command line following the magic #! prefix (called shebang).

From stack overflow^

const path = require('path')
const fs = require('fs')
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does hideBin do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just helper that simplifies command line parsing

'./dist/zap-mac-x64.zip',
path.join(outputPath, 'zap-mac-x64.zip')
])
await scriptUtil.executeCmd({}, 'mv', [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we comment this one out because it does not even work?

@dhchandw dhchandw merged commit 2e03156 into project-chip:master Oct 10, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants