Skip to content

Commit 1f7212e

Browse files
authored
versioning: transition from nerdbank to version file (#1231)
With the [plan to migrate GCM to a formula for release via `Homebrew/homebrew-core`](#1102), it became clear that [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) was no longer an option for versioning the project. This is because `Nerdbank.GitVersioning` requires history to calculate things like ['Git height'](https://github.com/dotnet/Nerdbank.GitVersioning#what-is-git-height), and the formula requires a tarball to build, which, of course, has no history. This change pivots GCM to the simpler strategy of using a version specified in a `VERSION` file at root. This version will be updated by maintainers prior to release - giving them more granular control of versioning, which in turn allows for versioning to be more predictable (i.e. maintainers will know what the version will be before publication of the release). The version specified in the file is the one slated for the next release: `2.1.0.0`. **Note:** This change [fails on Windows](https://github.com/ldennington/git-credential-manager/actions/runs/4824686907) due to a [bug in MSAL](AzureAD/microsoft-authentication-library-for-dotnet#4108) unless we ensure all projects have at least 1 dependency. We are working around this issue by adding Newtonsoft.Json as this dependency (since we were already shipping it anyway).
2 parents f1a235d + 20f918b commit 1f7212e

14 files changed

+166
-160
lines changed

.github/workflows/codeql-analysis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ jobs:
2222
language: [ 'csharp' ]
2323

2424
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
27-
with:
28-
fetch-depth: 0 # patch around Nerdbank.GitVersioning failure
25+
- uses: actions/checkout@v3
2926

3027
# Initializes the CodeQL tools for scanning.
3128
- name: Initialize CodeQL

.github/workflows/continuous-integration.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
os: [ubuntu-latest, windows-latest, macos-latest]
1818

1919
steps:
20-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
21-
with:
22-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
20+
- uses: actions/checkout@v3
2321

2422
- name: Setup .NET
2523
uses: actions/[email protected]

.github/workflows/lint-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Lint markdown files
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
21+
- uses: actions/checkout@v3
2222

2323
- uses: DavidAnson/markdownlint-cli2-action@cdfad95cc96588c74b62ad2d3f2e1772090099ac
2424
with:
@@ -30,7 +30,7 @@ jobs:
3030
name: Check for broken links
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
33+
- uses: actions/checkout@v3
3434

3535
- name: Run link checker
3636
# For any troubleshooting, see:

0 commit comments

Comments
 (0)