0

It is necessary for our develop branch to be tagged because our build process takes the tag name as the semver build version, e.g. v3.5.1. Develop branch can be built any time and deployed to staging server automatically.

However, gitflow model only describes how and when to tag master branch. If I start tagging develop branch as well, I will "lose" those names and won't be able to use them for tagging master branch.

I could for example tag the develop branch to something bigger than current master, every time I tag the master. But then I would have to remember to next time tag the master to something bigger than previous develop tag.

Any other advice how to manage this workflow?

Ska
  • 6,658
  • 14
  • 53
  • 74
  • what about adding _rc_, _snapshot_, _nightly_ or something to your dev tags? – Francesco Aug 21 '17 at 14:37
  • Good idea. Then the last question is how to bump the version. If I have 3.5.1 on master and we start new work on develop branch, shall I at this point name it 3.5.1-something, or 3.5.2-something – Ska Aug 21 '17 at 14:43
  • 2
    Well if it is a _release candidate_, I would use 3.5.2-rc – Francesco Aug 21 '17 at 14:45
  • Once it comes to RC's those would already be on release/* branches. – Ska Aug 21 '17 at 19:08
  • If it's not RC, than could be _nightly_ or whatever you want. But are you going to tag manually every branch on dev? – Francesco Aug 21 '17 at 19:10
  • Ideally not, dev build could maybe have a timestamp after minor revision. Master build would be manually tagged. – Ska Aug 21 '17 at 19:24

1 Answers1

0

There are basically two types of references in Git:

  • tags, which are put by the user, and which aren't supposed to move
  • branches, which are updated by Git itself

So, if you plan to put regularly tags with no real semantic, you're more or less re-inventing the concept of branch. But you're managing it manually.

To put it in a nutshell: my advice to manage this workflow would be to adapt a bit the build tool, to ensure that it doesn't only takes into account tags, but that it can also take into account the develop branch.

(It would probably not be too hard to do, because git can often be given a tag name or a branch name without change in semantic)

gturri
  • 13,807
  • 9
  • 40
  • 57