Gitflow introduces several branches like develop, release, hotfix, and also encourages feature branches.
In a Maven project, you usually build SNAPSHOT and release versions, and often number them with semantic, three-digit versions.
It would be sensible to automate the build process as much as possible, but the question is: When should we build a SNAPSHOT version, when should be build a release version, when should we build none of that at all?
I image the following could be sensible:
- Whenever a feature branch is merged back into
develop, a SNAPSHOT build is triggered and deployed to the Maven repository. - When a
releasebranch is created, as release build is started.
But there are much more situations:
- When I fix bugs on the
release(orhotfix) branch, do I always want a new release build? - During developing a feature, should I build on the feature branch? If so, what should this version be called (
1.2.3-FEATURE1-SNAPSHOT?)?