3

Following on from my previous question regarding feature branches with you can find here Centralized GIT workflow/deployment - Repository Initialization and Feature Branches I've got a few questions about 'Release branches'.

Firstly, I'll go through the workflow:

The state of develop is ready for the “next release” and we have decided that this will become version 1.0

git checkout -b release-1.0 develop

./bump-version.sh 1.0

OK my first question. Do I need to create the bump-version script or can I download it from somewhere? What does it specifically do and where does it need to be installed?

Community
  • 1
  • 1
Derek Carlisle
  • 485
  • 10
  • 27

3 Answers3

2

I'm a bit confused about your question. Do you need a script that can tell you the actual version number?

You could try git describe master for instance, which will give you a specific name from the latest tag you created. Take a look on the Preparing a release section on the Pro Git book.

rlegendi
  • 10,466
  • 3
  • 38
  • 50
  • 1
    I'm following http://nvie.com/posts/a-successful-git-branching-model/ and it says to run ./bump-version.sh so I'm trying to figure out what this actually is. – Derek Carlisle Nov 15 '12 at 11:58
  • As it is written in the tutorial you linked: *"After creating a new branch and switching to it, we bump the version number. Here, bump-version.sh is a fictional shell script that changes some files in the working copy to reflect the new version. (This can of course be a manual change—the point being that some files change.) Then, the bumped version number is committed."* – rlegendi Nov 15 '12 at 12:24
  • Yes I saw that but which files are changed and what to? Can I get the script from somewhere? – Derek Carlisle Nov 15 '12 at 12:51
  • No, there's no such script, because *"bump-version.sh is a fictional shell script "*. It's just an example :-) Each project has its own relase process that updates the version number, you have to develop your custom process. – rlegendi Nov 15 '12 at 14:22
1

From the looks of your previous question you are attempting to follow: http://nvie.com/posts/a-successful-git-branching-model/

Have you tried to use git-flow? It was designed to help with these questions.

https://github.com/nvie/gitflow

Chadit
  • 965
  • 2
  • 12
  • 27
0

"What bump-version.sh does" would depend on your build process. For instance if you use maven, it might sed your pom to set the version. If you use sbt, you could keep the version setting in a separate version.sbt file and the script could just overwrite the whole file.

nafg
  • 2,424
  • 27
  • 25