Skip to content

Conversation

@ajayk
Copy link
Member

@ajayk ajayk commented Mar 6, 2024

No description provided.

@jonjohnsonjr
Copy link
Member

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

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
Member

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