Message "Bump the version number now" has bothered me for a long time. You?

1,139 views
Skip to first unread message

Matthew Adams

unread,
Nov 12, 2015, 4:43:40 PM11/12/15
to gitflow-users
Hi all,

This has bothered me for some time.  Please let me know what you think.

I just issued the release start command again:

$ git flow release start 0.2
Switched to a new branch 'release/0.2'

Summary of actions:
- A new branch 'release/0.2' was created, based on 'develop'
- You are now on branch 'release/0.2'

Follow-up actions:
- Bump the version number now!
- Start committing last-minute fixes in preparing your release
- When done, run:

     git flow release finish '0.2'

The part that bothers me is that it says "Bump the version number now!".  I've taken that to mean in the newly created branch (release/0.2 in this case), which makes no sense to me.  Reason being, I think you should bump the version number in the develop branch, not the release/xxx branch.  After all, you want development to continue in the develop branch while you work in parallel on the next release.  IOW, for this example, the version in release/0.2 should be 0.2.0, and the version in develop should be 0.3.0.

Thoughts?  Should the message say "Bump the version number in develop now!"?

-matthew

Ellis Antaya

unread,
Nov 13, 2015, 7:07:43 AM11/13/15
to gitflow-users

You invoked the command yourself telling it to start the release of 0.2 : so first thing to do is to actually bumb the version in your code so if someone checkout this commit, it will know what version it is.


--
You received this message because you are subscribed to the Google Groups "gitflow-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitflow-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Adams

unread,
Nov 13, 2015, 8:15:35 AM11/13/15
to gitflo...@googlegroups.com
Ellis, please reread the paragraph below the terminal sample.  I think you missed the point entirely; if you didn't miss the point, then I've missed yours.

--
You received this message because you are subscribed to a topic in the Google Groups "gitflow-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gitflow-users/9O1L_VKSpO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gitflow-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Peter van der Does

unread,
Nov 13, 2015, 9:15:32 AM11/13/15
to gitflow-users
I understand what you mean, it does sound a bit confusing but it all is in your workflow and version numbering.

To explain with your examples:
Master Branch: Version is current version which is  0.1
Develop Branch: Version is next possible version, now this could be 0.1.1, 0.2, or 2.0, or even "next". It all depends on how you do version numbering.
Release Branch: Version is the next version. Depending on your Develop branch you actually might have to change the Version number in your release branch.

So maybe the "Bump" is not totally correct, maybe it should be "Update the version now if needed" and maybe there should be a "Bump version in develop now" message displayed after you finish a release.

I use git-flow AVH version and have the version numbering for a big part automated using the hooks and filters. I also adhere to Semantic Version.
Master Branch: Version is current version 0.1.0
Develop Branch: Version is next possible version 0.2.0-dev.<commits> Commits is is the number of commits on the develop branch since the last merge on Master. I can update the version on the CLI and it's automatically updated on a feature finish.
Release Branch: Version is the next version, I can set a version use the command line or leave the version and the version will be taken from the current develop branch without the "-dev.<commit>". Add "-rc.x" to the version where x is just a counter that I can update myself.

If you want to know more about the version automation let me know.

Peter

--
Peter van der Does
Maintainer of git-flow (AVH Edition)

git-flow (AVH Edition) is located on github:

Matthew Adams

unread,
Nov 13, 2015, 10:13:44 AM11/13/15
to gitflo...@googlegroups.com
Inline...

On Fri, Nov 13, 2015 at 8:15 AM, Peter van der Does <pvand...@gmail.com> wrote:

So maybe the "Bump" is not totally correct, maybe it should be "Update the version now if needed" and maybe there should be a "Bump version in develop now" message displayed after you finish a release.

Ok, that confirms my suspicions.
 

I use git-flow AVH version and have the version numbering for a big part automated using the hooks and filters. I also adhere to Semantic Version.
Master Branch: Version is current version 0.1.0
Develop Branch: Version is next possible version 0.2.0-dev.<commits> Commits is is the number of commits on the develop branch since the last merge on Master. I can update the version on the CLI and it's automatically updated on a feature finish.
Release Branch: Version is the next version, I can set a version use the command line or leave the version and the version will be taken from the current develop branch without the "-dev.<commit>". Add "-rc.x" to the version where x is just a counter that I can update myself.

Makes perfect sense.  Also jibes with what I was thinking.  I have seen the .<commit> recommendation around elsewhere & forgot to include that in my stuff.  I'll have a look at your AVH version.
 
If you want to know more about the version automation let me know.

Do tell, especially if it's something other than sed/awk/etc.
 
Peter

--
Peter van der Does
Maintainer of git-flow (AVH Edition)

git-flow (AVH Edition) is located on github:

--
You received this message because you are subscribed to a topic in the Google Groups "gitflow-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gitflow-users/9O1L_VKSpO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gitflow-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter van der Does

unread,
Nov 13, 2015, 11:36:58 AM11/13/15
to gitflo...@googlegroups.com
On 11/13/2015 10:13 AM, Matthew Adams wrote:
>
>
> If you want to know more about the version automation let me know.
>
> Do tell, especially if it's something other than sed/awk/etc.
>
>

As it's just shell it mostly is sed/grep stuff.
I have three repos with git-flow hooks. Two of them are related to
WordPress development and one for git-flow itself.

https://github.com/petervanderdoes/wp-plugin-hooks
https://github.com/petervanderdoes/wp-theme-hooks
https://github.com/petervanderdoes/git-flow-hooks

Besides Version numbering these hooks also check for other things, like
missed Patch lines in the source.

To give a run down what happens:
* git flow release start
1. As no version is given the filter filter-flow-release-start-version
will determine the current stable version and update the patch level and
returns the version to gitflow
2. The hook post-flow-release-start will add "-rc.1" and update the
version throughout the source and do a commit.

You work on the release branch

* git flow release finish
1. The hook pre-flow-release-finish updates the source with the final
version based of the branch name.
2. git flow merges the release branch in master, master in develop etc.
3. The hook post-flow-release-finish updates the Patch Level, adds
"-dev.1" to version and updates the source with the new version number.

There are other things that happen in the hooks but that's not relevant
to the version updating. If you do give a version number at "git flow
release start" the filter filter-flow-release-start-version will
determine the next version based on the given version.
Reply all
Reply to author
Forward
0 new messages