-
-
Notifications
You must be signed in to change notification settings - Fork 940
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
Integrate with Nerdbank.GitVersioning #1299
Conversation
IncludeSymbols
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
…his particular project needs versioning. include package version in ThisAssembly and use nuget package version for the SSH client version. Since we define the precision of nuget package to "build", it has 3 digits. Nuget package version is unique which should be suffient.
I get a weird error when building this branch
|
It seems to be a bug in the Nerdbank package, where it does not correctly handle lightweight tags in .git/ref/tags (e.g. 2023.0.1). In a fresh clone, the tags are in .git/packed-refs which are handled correctly, hence it passing in CI. In my local copy of the repo, the tags are in .git/ref/tags and it is assuming they are all annotated tags. |
I've not forgotten about this PR, I just want to read up some more on the configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that 2024.0.0 already has the commit info tagged to the dll (probably because of sourcelink?):
In that case, I am not sure if there still benefits to this change. I am not sure the release process needs to change (it seems simple enough), but as I don't make the releases I think I will have to defer to @WojciechNagorski as to whether to take this change.
version.json
Outdated
}, | ||
"release": { | ||
"tagName" : "{version}", | ||
"branchName" : "master", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be e.g.
"branchName" : "master", | |
"branchName" : "release/{version}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the curernt release is based on master
branch with tag?
Not very familar with current release process, but it seems to be some manual work? |
Yes it is manual |
I guess the current release process is based on https://github.com/sshnet/BuildTools and https://github.com/sshnet/SSH.NET/blob/develop/build/build.proj, am I right? @WojciechNagorski |
Currently it is just dotnet pack right now. |
I actually have some local changes for this, let me fix the merge and push them in |
- Remove the "release" section. I don't think we will use that for now - Remove the "cloudBuild" section. Changing the CI build number doesn't seem that useful - In the "nugetPackageVersion" section: - Remove "precision". It defaults to build - Add "semVer"=2. This makes the package version e.g. 2024.1.1-prerelease.1 instead of 2024.1.1-prerelease-0001 - In "assemblyVersion" change "precision" to revision. Doesn't seem to change anything, I was just copying nbgv's setup: https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/version.json - Make sure there are no '-' in the softwareversion string (change the test to a regex)
Example on a PR branch: internal static partial class ThisAssembly {
internal const string AssemblyConfiguration = "Release";
internal const string AssemblyFileVersion = "2024.1.1";
internal const string AssemblyInformationalVersion = "2024.1.1-prerelease.2+84ff4f6671";
internal const string AssemblyName = "Renci.SshNet";
internal const string AssemblyTitle = "SSH.NET";
internal const string AssemblyVersion = "2024.1.1.0";
internal static readonly global::System.DateTime GitCommitDate = new global::System.DateTime(638576102900000000L, global::System.DateTimeKind.Utc);
internal const string GitCommitId = "84ff4f66711638341a0d856299f7a62ae4bbf38b";
internal const bool IsPrerelease = true;
internal const bool IsPublicRelease = false;
internal const string NuGetPackageVersion = "2024.1.1-prerelease.2.g84ff4f6671";
internal const string PublicKey = "0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2";
internal const string PublicKeyToken = "1cee9f8bde3db106";
internal const string RootNamespace = "Renci.SshNet";
} Example on a simulated "public" branch e.g. internal static partial class ThisAssembly {
internal const string AssemblyConfiguration = "Release";
internal const string AssemblyFileVersion = "2024.1.1";
internal const string AssemblyInformationalVersion = "2024.1.1-prerelease.3+57319f736f";
internal const string AssemblyName = "Renci.SshNet";
internal const string AssemblyTitle = "SSH.NET";
internal const string AssemblyVersion = "2024.1.1.0";
internal static readonly global::System.DateTime GitCommitDate = new global::System.DateTime(638576099590000000L, global::System.DateTimeKind.Utc);
internal const string GitCommitId = "57319f736f1d0dbf25455f121669223d8fc48893";
internal const bool IsPrerelease = true;
internal const bool IsPublicRelease = true;
internal const string NuGetPackageVersion = "2024.1.1-prerelease.3";
internal const string PublicKey = "0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2";
internal const string PublicKeyToken = "1cee9f8bde3db106";
internal const string RootNamespace = "Renci.SshNet";
} |
No description provided.