Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versioning: transition from nerdbank to version file #1231

Merged
merged 4 commits into from
May 2, 2023

Conversation

ldennington
Copy link
Contributor

@ldennington ldennington commented Apr 27, 2023

With the plan to migrate GCM to a formula for release via Homebrew/homebrew-core, it became clear that Nerdbank.GitVersioning was no longer an option for versioning the project. This is because Nerdbank.GitVersioning requires history to calculate things like '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 due to a bug in MSAL 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).

@ldennington ldennington changed the title versioning: transition from nerdbank to VERSION file versioning: transition from nerdbank to version file Apr 27, 2023
@ldennington ldennington self-assigned this Apr 27, 2023
@ldennington ldennington marked this pull request as ready for review April 28, 2023 16:14
@ldennington
Copy link
Contributor Author

ldennington commented Apr 28, 2023

Note: There are also a number of whitespace corrections that were automatically added to my changes due to my VS Code settings.

Copy link
Collaborator

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Remove Nerdbank.GitVersioning dependency from project in favor of a new
VERSION file, which will be updated ahead of each release. Versioning in
this file will begin with the version we plan to use for the next release:
2.1.0.0.

This change involves the addition of a new custom MSBuild task, which
reads in the contents of the VERSION file, converts it to a Version
object, and then sets the various version-related MSBuild properties with
the correct value (some with the `Revision` component appended, others
without).

Note that there is a bug in MSAL [1] that causes build failures for
projects without dependencies with this change. We add Newtonsoft.Json as
a global dependency in Directory.Build.props to work around this problem
until the fix is released.

[1]: AzureAD/microsoft-authentication-library-for-dotnet#4108
@ldennington ldennington force-pushed the update-versioning branch 2 times, most recently from 8e082cc to 4e1924d Compare May 1, 2023 02:22
Update release workflow to use VERSION file for versioning, rather than
Nerdbank.GitVersioning.
Remove Nerdbank.GitVersioning tasks (which have been superceded by the use
of the new VERSION file) from the release workflow.
Remove fetch-depth from checkout actions, since that was required by
Nerdbank.GitVersioning. Also take this opportunity to use consistent version
and naming for checkout actions.
@ldennington ldennington merged commit 1f7212e into git-ecosystem:main May 2, 2023
7 checks passed
mjcheetham added a commit that referenced this pull request May 2, 2023
**Changes:**

- Support ports in URL-scoped config (#825)
- Support URL-scoped enterprise default settings (#1149)
- Add support for client TLS certificates (#1152)
- Add TRACE2 support(#1131, #1151, #1156, #1162)
- Better browser detection inside of WSL (#1148)
- Handle expired OAuth refresh token for generic auth (#1196)
- Target *-latest runner images in CI workflow (#1178)
- Various bug fixes:
  - Ensure we create a WindowsProcessManager on Windows (#1146)
  - Ensure we start child processes created with ProcessManager (#1177)
  - Fix app path name of Windows dropping file extension (#1181)
  - Ensure we init IEnvironment before SessionManager (#1167)
  - git: consistently read from stdout before exit wait (#1136)
  - trace2: guard against null pipe client in dispose (#1135)
- Make Avalonia UI the default Windows and move to in-process (#1207)
- Add Git configuration options for trace & debug (#1228)
- Transition from Nerdbank.GitVersioning to a version file (#1231)
- Add support for using the current Windows user for WAM on DevBox
(#1197)
- Various documentation updates:
  - org-rename: update references to GitCredentialManager (#1141)
  - issue templates: remove core suffix (#1180)
  - readme: add link to project roadmap (#1204)
  - docs: add bitbucket app password requirements (#1213)
  - .net tool: clarify install instructions (#1126)
  - docs: call out different GCM install paths in WSL docs (#1168)
  - docs: add trace2 to config/env documentation (#1230)
@ldennington ldennington deleted the update-versioning branch July 12, 2023 18:25
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.

None yet

3 participants