Skip to content

Version = tag patch + merged PRs; publish only from main, dev or master - #11

Merged
lastlink merged 1 commit into
mainfrom
fix/version-merge-count
Nov 2, 2026
Merged

lastlink merged 1 commit into
mainfrom
fix/version-merge-count

Conversation

@lastlink

@lastlink lastlink commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces GitVersion's own number with doi's rules (scripts/version/versionRules.{sh,ps1}, sourced by generateVersion): on main/master the version is MAJOR.MINOR.(newest tag patch + pull requests merged since the tag, min 1); a tagged commit is the tag; any other branch is that number plus -<commits on the branch>. Matches GitHub's Merge pull request #N merge commits rather than GitLab's into 'main'. Today that gives 0.1.4, where the previous workflow printed 0.1.1-7.
  • publish.yaml fails unless it runs on main, dev or master: a manual run must be started on one of them (dry runs included), and a release's tag must be on one of them.
  • Docs and the GitVersion.yml header describe the new rule.

Test plan

  • bash and pwsh generateVersion both give 0.1.4 for main locally
  • CI passes
  • Dry-run dispatch from main passes; one from another branch fails at the new gate

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

unit test report

29 tests  ±0   29 ✅ ±0   0s ⏱️ ±0s
 2 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit b26afa3. ± Comparison against base commit 97f830a.

@lastlink
lastlink merged commit af2ecaf into main Nov 2, 2026
2 of 3 checks passed
@lastlink
lastlink deleted the fix/version-merge-count branch November 2, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant