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

wolfictl pmub: just a reverse of wolfictl bump #677

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajayk
Copy link
Member

@ajayk ajayk commented Mar 6, 2024

No description provided.

@jonjohnsonjr
Copy link
Contributor

What if this was just a flag on bump?

@ajayk ajayk force-pushed the reverse-bump branch 7 times, most recently from 4d4e400 to 1724442 Compare March 8, 2024 10:27
@ajayk
Copy link
Member Author

ajayk commented Mar 8, 2024

@jonjohnsonjr PTAL

@@ -120,6 +129,7 @@ modifying anything in the filesystem.
cmd.Flags().BoolVar(&opts.epoch, "epoch", true, "bump the package epoch")
cmd.Flags().BoolVar(&opts.dryRun, "dry-run", false, "don't change anything, just print what would be done")
cmd.Flags().StringVar(&opts.repoDir, "repo", ".", "path to the wolfi/os repository")
cmd.Flags().BoolVar(&opts.increment, "increment", true, "increments/decrements the package epoch")
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we ever want to bump by anything other than -1 and +1? Would it make sense to have this take an int flag that defaults to 1?

E.g. to bump down, do this:

wolfictl bump --by -1 foo.yaml

If not, then I think I'd prefer this be a negative flag (--decrement or --substract or --minus or --undo) that defaults to false because it's easier to type:

wolfictl bump --undo

Than it is to type:

wolfictl bump --increment=false

But also because I just learned that this would be an error:

wolfictl bump --increment false

(See wolfi-dev/os@bfe82af 🤦)

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.

2 participants