your-tools / tbump

Bump software releases
BSD 3-Clause "New" or "Revised" License
158 stars 22 forks source link

Do not create and push tags. #75

Closed ghost closed 4 years ago

ghost commented 4 years ago

In our workflow, we do not allow merges to the main branch. However, we have a simple github action that tags main if the version has changed. An option to not tag and push the tag would be really useful.

dmerejkowsky commented 4 years ago

Hi @ygworldr

An option to not tag and push the tag would be really useful.

I'm not sure what you mean. If tbump does not make the tag, how can it push it?

We have a similar problem at Tanker where the tag is pushed by the CI. Maybe you could run tbump with --only-patch and let GitHub Actions create the tag and push it afterwards ?

ghost commented 4 years ago

How odd. Here is what I did:

√ ; cd src/junk
√ (master L|✓); tbump --dry-run 0.0.1
:: Bumping from 0.0.0 to 0.0.1
=> Would patch these files
- VERSION:1 0.0.0
+ VERSION:1 0.0.1
- tbump.toml:5 current = "0.0.0"
+ tbump.toml:5 current = "0.0.1"
=> Would run these git commands
$ git add --update
$ git commit --message Bump to 0.0.1
$ git tag --annotate --message v0.0.1 v0.0.1
$ git push
$ git push  v0.0.1

The output suggests that tbump would run git tag --annotate --message v0.0.1 v0.0.1 and git push v0.0.1.

I would like the commit message to happen so --only-patch is not perfect.

I am kinda trying to mimic bump2version here but I think the post/pre hook will solve some problems thus moving to tbump.

Does that make sense?

dmerejkowsky commented 4 years ago

I would like the commit message to happen so --only-patch is not perfect.

Oh I see. Thanks for the clarification.

I am kinda trying to mimic bump2version here but I think the post/pre hook will solve some problems thus moving to tbump.

Then you have a second problem : if you run with --only-patch the hooks will not run.

Does that make sense?

Makes perfect sense. I think this is the same as !#65, then.

If you agree I'll close this one.

ghost commented 4 years ago

Oh I see. Thanks for the clarification.

☺ Great!

Makes perfect sense. I think this is the same as !#65, then.

I think both can be merged yes. @dcd271b2 still wants the tag, just not the push. I want neither tag nor tag push but I do want the commit. Ah, the joys of users causing trouble⸮