Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Move from sliding tags to branch based versioning #264

Closed
ericcornelissen opened this issue Aug 2, 2022 · 1 comment
Closed

Move from sliding tags to branch based versioning #264

ericcornelissen opened this issue Aug 2, 2022 · 1 comment
Assignees
Labels
meta Relates to the project or repository itself

Comments

@ericcornelissen
Copy link
Owner

ericcornelissen commented Aug 2, 2022

Project Initiative

Update the versioning strategy from a sliding tag1 to a branch-based release strategy. Per the references, updating the commit that a tag points to is not "the git way". Using a branch for a continuously updating point of reference in the repository is more natural, and supported by GitHub Actions.

Options

Sliding v2 branch

Have a branch called v2 that points to some commit on the main branch, as suggested in the changes proposed in [2].

Example, going from:

gitGraph
  commit id: "fa6b1f8"
  commit id: "ca2f706" tag: "v2.0.1"
  commit id: "50860d3"
  commit id: "f164e28"
  commit id: "c2b9047 (v2)" type: HIGHLIGHT tag: "v2.1.0"
  commit id: "a473695"
  commit id: "fa3f790"
Loading

with the v2 branch pointing to c2b9047, to

gitGraph
  commit id: "fa6b1f8"
  commit id: "ca2f706" tag: "v2.0.1"
  commit id: "50860d3"
  commit id: "f164e28"
  commit id: "c2b9047" tag: "v2.1.0"
  commit id: "a473695"
  commit id: "fa3f790 (v2)" type: HIGHLIGHT tag: "v2.1.1"
Loading

with the v2 branch pointing to fa3f790.

Dedicated v2 branch

Have a dedicated v2 branch that main is occasionally merged into to cut a release. This is similar to the main-develop strategy (where develop=main and main=v2).

gitGraph
  commit id: "test" tag: "v2.0.1"
  branch v2
  commit id: "init branch"
  checkout main
  commit id: "feature"
  checkout v2
  merge main tag: "v2.1.0"
  checkout main
  commit id: "bugfix"
  checkout v2
  merge main tag: "v2.1.1"
  checkout main
  commit id: "chore"
Loading

Rename main to v2

Stop using a main branch and just have v2 branch. This would be simple, but means the v2 ref is unstable. Hence, at the very list this would require a breaking change (i.e. jump to v3).

gitGraph
  branch v2
  checkout v2
  commit id: "fa6b1f8"
  commit id: "ca2f706" tag: "v2.0.1"
  commit id: "50860d3"
  commit id: "f164e28"
  commit id: "c2b9047" tag: "v2.1.0"
  commit id: "a473695"
Loading

Others?

Suggestions are welcome (even if this issue has since been closed).

References

  1. https://git-scm.com/docs/git-tag#_on_re_tagging
  2. Recommend updating branches for major versions and not tags in the versioning docs actions/toolkit#631 (and related)

Footnotes

  1. Sliding a tag meaning updating the commit that a tag points to.

@ericcornelissen ericcornelissen added help wanted Extra attention is needed meta Relates to the project or repository itself and removed help wanted Extra attention is needed labels Aug 2, 2022
@ericcornelissen ericcornelissen self-assigned this Aug 7, 2022
@ericcornelissen
Copy link
Owner Author

ericcornelissen commented Aug 7, 2022

At least initially, this project will go for the "Sliding v2 branch" approach.

Progress

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
meta Relates to the project or repository itself
Projects
None yet
Development

No branches or pull requests

1 participant