sbt-git icon indicating copy to clipboard operation
sbt-git copied to clipboard

An example release workflow using GitVersioning would be helpful in docs.

Open metasim opened this issue 10 years ago • 7 comments

Trying to figure out how to use GitVersioning during my git-flow-structured release process. Having an outline of example release process using GitVersioning would be helpful in bridging that gap.

In my specific case, trying to reconcile deriving version numbers from branch names vs. tag names, and if the publishing the release happens before or after the the release branch is merged onto master.

metasim avatar Apr 16 '15 12:04 metasim

Also wondering if using git.useGitDescribe := true should be a manual operation (via set) or something one leaves in the build.sbt file. If the latter, how does one do a SNAPSHOT release?

metasim avatar Apr 16 '15 13:04 metasim

PS: Will volunteer to do a docs PR on this if provided an example release process that is perhaps project specific yet generalizable.

metasim avatar Apr 16 '15 13:04 metasim

PSS:

This is what I did with my last release, but it doesn't seem as smooth as it should be (with or without the git-flow parts:


  1. In git-flow start a new release using with a name of the form v1.2.3 (semantic version number prefixed by v).
  2. Update git.baseVersion in version.sbt to have the target version number.
  3. Finish the release per git-flow, including creating a tag with the release name (i.e. v1.2.3).
  4. In sbt console:
    • set git.useGitDescribe := true
    • publish

metasim avatar Apr 16 '15 13:04 metasim

SO,

  1. I'm not familiar with git-flow. Is this the new cool thign to do, instead of being pedantic like me?
  2. Why is useGitDescribe mandatory here? Shouldn't it pick up the tag automagically?

I love the idea, and would welcome the docs, BTW, just curious on details.

jsuereth avatar Apr 23 '15 13:04 jsuereth

I don't think my workflow example is correct... you should probably ignore it. Was mostly interested in if someone could point me to an example release process that used this plugin so I could see how others did it (and generalize it). Do you think I should pose this issue to a Gitter channel or mailing list?


FWIW, git-flow is just a formalization of what most multi-contributor GitHub projects do intuitively, with a bit more process around the release and hot-fix modes. It's supported by several GUI interfaces to git (e.g. in SourceTree), automating the various branch, merge, tag steps.

metasim avatar Apr 24 '15 00:04 metasim

@jsuereth Would some form of this be helpful in the docs here?

https://github.com/sbt/sbt-pom-reader/blob/master/notes/release-process.markdown

metasim avatar May 21 '15 01:05 metasim

Does anyone use sbt-git for this these days? Should we just recommend other plugins such as sbt-dynver and/or sbt-ci-release?

SethTisue avatar Mar 07 '22 20:03 SethTisue