Tags: devlooped/GitInfo
Tags
Set Version and PackageVersion to a default value
It's not entirely intuitive that you install GitInfo and by default
"nothing happens", as in, you get new code from ThisAssembly,
but otherwise, no versioning changes happen. This might be
counterintuitive to newcomers, who might just care to get
something (a sensible default) going, before investing more
in customizing GitInfo.
This is how MinVer does it (provided there's a version tag
in the repository) and it's quite intuitive.
The way we do it here should be mostly backwards compat
because:
1. Users leveraging assembly-version attributes will already
have disabled .NET SDK assembly attribute generation
2. Users leveraging MSBuild targets to do this would be
following the recommended guidance of creating a target
that runs before specific targets, not as InitialTargets
We make our version-setting target run as an inital target,
which may have a minor impact on initial build perf, but
but shouldn't be a problem since the same targets are
run for DTB anyway (if you make them run before
GetAssemblyVersion, which also runs before
BeforeCompile and CoreCompile in the SDK).
By being an initial target, we allow for existing customization
in pretty much any target, prevail our own one, which becomes
just a default.
Even so, we check for GitVersion=false as an escape hatch for
users who may encounter unforseen broken scenarios.
Switch to ThisAssembly.Constants for C# The approach for codegen in ThisAssembly uses the much better incremental source generators in Roslyn to expose this information. Make it so we leverage that for the scenarios that ThisAssembly.Constants already supports too.
⬆️ Bump files with dotnet-file sync # devlooped/oss - Switch to built-in release notes generator devlooped/oss@2c80ab0 - Ignore docs merges too devlooped/oss@055a8b7 - Remove duplicate community files and unused stuff devlooped/oss@a4b66eb - Add specific skip rules for tests devlooped/oss@448cf45 - Switch to newer syntax for output variables devlooped/oss@9dc1ae2 - Automatically build from dev/* branches too devlooped/oss@6d3dd85 - Drop net6 forced install, it's built-in all agents now devlooped/oss@34c1bf6 - Drop net6 setup on prior to dotnet format devlooped/oss@4b31891 - Drop net6 setup on publish too devlooped/oss@d302256 - Switch to old nuget.config for package sources devlooped/oss@c6f74ce - Invert order of sources in mapping devlooped/oss@8b4ce81 - Fix mapping sources devlooped/oss@b2fa09b - Don't fail sponsors tagging, since it's optional devlooped/oss@8990ebb - Enable C# compiler strict mode by default devlooped/oss@ef8e7fa # clarius/pages - Add cross-posting pages workflow clarius/pages@d3b026e - Create Gemfile clarius/pages@565a77f
PreviousNext