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

use --arch for ops pkg push cmd (with sanitisation for amd64) #1618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

radiosilence
Copy link
Contributor

@radiosilence radiosilence commented Apr 25, 2024

Basically this completes the loop for pushing packages with multiple arches via CLI.

Seeing as the current --arch flag accepts either amd64 (as opposed to x86_64) or arm64, I'm manually changing this in the request data when it's pushed to the repo.

Also falls back to x86_64 if it's blank/unset

Also it slightly changes the behaviour when searching local packages, as previously it was erroring out if one of the existing arches didn't exist yet, so we just log it and continue instead.

@radiosilence radiosilence changed the title add arch to ops pkg push cmd with sanitisation for amd64 use --arch for ops pkg push cmd (with sanitisation for amd64) Apr 25, 2024
@@ -623,7 +624,7 @@ func pushCommandHandler(cmd *cobra.Command, args []string) {
}
defer os.RemoveAll(archiveName)

req, err := api.BuildRequestForArchiveUpload(ns, name, foundPkg, archiveName, private)
req, err := api.BuildRequestForArchiveUpload(ns, name, foundPkg, archiveName, private, arch)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you change this to pkgFlags.Parch() ?

then I believe you can get rid of the arch flag above as well

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.

None yet

2 participants