Add --arch flag to build and publish commands for single-arch builds#476
Open
Add --arch flag to build and publish commands for single-arch builds#476
Conversation
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 34828b3 This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
Contributor
|
I wouldnt let the sdk publish something with only 1 arch if 2 are present in the manifest. This may provoke that we stop supporting an arch unintentionally in the future |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--archflag tobuildandpublishcommands to allow building for a single architecture instead of all architectures defined in the manifestlinux/arm64,linux/amd64) and shorthands (arm,arm64,amd64,x64, etc.)Usage
Changed files
src/commands/build/index.ts- Register--archCLI optionsrc/commands/build/types.ts- AddarchtoBuildCommandOptionssrc/commands/build/handler.ts- Filter architectures +normalizeArchitecturehelpersrc/commands/publish/index.ts- Register--archCLI optionsrc/commands/publish/types.ts- AddarchtoPublishCommandOptionssrc/commands/publish/handler.ts- Filter architectures using shared helperTest plan
--arch arm64and verify only arm64 image is built--arch amd64and verify only amd64 image is builtarm,arm64,amd64,x64) resolve correctly--archwith an unsupported architecture for the package--archstill build all architectures as before