-
Notifications
You must be signed in to change notification settings - Fork 994
flash: add -o flag support to save built binary (Fixes #4937) #4942
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
flash: add -o flag support to save built binary (Fixes #4937) #4942
Conversation
main.go
Outdated
|
|
||
| // validateOutputFormat checks if the output file extension matches the expected format | ||
| func validateOutputFormat(outpath, expectedExt string) error { | ||
| if outpath == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code checks for this condition already before calling this function, so this seems redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. That check is indeed redundant since we validate outpath before calling this function. I cleaned this up.
|
The macOS CI job (build-macos-14) is being canceled after running for almost 6 hours due to a timeout. Could a maintainer advise on how to proceed in this situation? |
|
@rdon-key can you please rebase this branch against the latest |
7394a2a to
e11e88b
Compare
|
@deadprogram |
|
Hi! It's been about 2 weeks since I rebased this PR as requested. Could you please let me know if there's anything else needed for this PR to move forward? I'm happy to address any additional feedback. Thanks! |
|
OK going to now squash/merge this one unless any objections? |
* Add -o flag support to flash command. Fixes #4937 * Remove empty outpath check in validateOutputFormat --------- Co-authored-by: rdon <[email protected]>
This PR adds
-oflag support to thetinygo flashcommand, allowing users to save the built binary to a specified output file. This bringsflashin line with the behavior oftinygo build, promoting consistency and improving usability.Fixes #4937
Changes
-oflag support to theflashcommandvalidateOutputFormatfunction to check compatibility with the target formatflashcommand with usage examplesBehavior
-ois specified, the binary is both saved and flashed.uf2,.hex)Testing Results