Tags: devlooped/GitInfo
Tags
Bump ThisAssembly.AssemblyInfo from 1.2.11 to 1.2.14 Bumps [ThisAssembly.AssemblyInfo](https://github.com/devlooped/ThisAssembly) from 1.2.11 to 1.2.14. - [Release notes](https://github.com/devlooped/ThisAssembly/releases) - [Changelog](https://github.com/devlooped/ThisAssembly/blob/main/changelog.md) - [Commits](devlooped/ThisAssembly@v1.2.11...v1.2.14) --- updated-dependencies: - dependency-name: ThisAssembly.AssemblyInfo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
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.