build: using GitVersion more consistently

This commit is contained in:
Dylan R. E. Moonfire 2022-06-06 10:35:42 -05:00
parent 53d36cd8c2
commit 48a6933a64
3 changed files with 33 additions and 1 deletions

30
GitVersion.yml Normal file
View file

@ -0,0 +1,30 @@
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: '{InformationalVersion}'
mode: ContinuousDelivery
increment: Inherit
continuous-delivery-fallback-tag: ci
tag-prefix: '[vV]'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
tag-pre-release-weight: 60000
commit-message-incrementing: Enabled
merge-message-formats: {}
update-build-number: true
# Conventional Commits
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
# Branch-Specific
branches:
main:
regex: ^master$|^main$
mode: ContinuousDelivery
tag: ''
prevent-increment-of-merged-branch-version: true
track-merge-target: false
is-mainline: true
pre-release-weight: 55000

View file

@ -20,7 +20,6 @@ fi
dotnet clean dotnet clean
# Version the file based on the Git repository. # Version the file based on the Git repository.
(cd src && dotnet dotnet-gitversion /updateprojectfiles)
SEMVER="v$(dotnet gitversion /output json | jq -r .SemVer)" SEMVER="v$(dotnet gitversion /output json | jq -r .SemVer)"
if [ "x$SEMVER" = "x" ] if [ "x$SEMVER" = "x" ]

View file

@ -19,5 +19,8 @@ lefthook install
# Make sure our tools are installed. # Make sure our tools are installed.
dotnet tool restore dotnet tool restore
# Make sure everything is the right version.
dotnet gitversion /updateprojectfiles
# Everything is good. # Everything is good.
exit 0 exit 0