Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Jul 4, 2025

…ted but still working

- What I did
Added pkg build --push as a better alternative to pkg push, but still keeping pkg push as functioning (but marked deprecated).

It may not seem like much of a difference, but it has two benefits:

First, to users, the flags are more consistent. Flags should always be for one of:

  • a command (Flags)
  • a command and all of its subcommands (Persistent Flags)

This weird hybrid, where all of the flags were shared for pkg push and pkg build, but not any other pkg subcommands, was confusing. Now, these are pkg build commands.

Second, to us, the code supporting it is cleaner and simpler.

- How I did it
Removed the shared function, made it part of pkgBuild() and changed pkgPush() to just call build after setting --push flag to true.

- How to verify it
CI will check that there are no regressions. I tested each step, including making sure flags get carried over.

- Description for the changelog

pkg build --push replaces pkg push

@deitch deitch force-pushed the merge-build-push branch from f16f326 to b02884f Compare July 4, 2025 14:06
@deitch deitch force-pushed the merge-build-push branch from b02884f to 6cd8de1 Compare July 4, 2025 14:10
@deitch deitch merged commit c0c5668 into linuxkit:master Jul 4, 2025
22 checks passed
@deitch deitch deleted the merge-build-push branch July 4, 2025 15:00
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.

1 participant