Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ All notable changes to this project are documented here. The format follows [Kee

- nuget.org's allowed image hosts moved from a property default to `nuget.allowed-image-hosts.txt` in the Packaging part, read only on pack; `MSKit_PackageReadmeAllowedImageHosts` still replaces it.

### Fixed

- A test project with a single `<TargetFramework>` (net8.0, net9.0, net10.0) no longer fails with a false `MSKIT_TEST005`, and on net8.0/net9.0 gets `TestingPlatformDotnetTestSupport`: the TfmConstants part now evaluates `IsNETxx` again in the targets phase, after the csproj body has set the framework. The props-phase values stay for multi-targeted inner builds.
- `MSKIT_PKG016` no longer fires on GitLab and the other hosts the generated readme knows: with `MSKit_PackageReadmeFrom` set, an empty `PackageReleaseNotes` defaults to the releases page the readme links (`MSKit_ReleasesUrl`). GitHub keeps its tag release page; `MSKit_DefaultReleaseNotes=False` still turns the default off.

## [0.1.1] - 2026-10-04

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Default parts are always installed; add optional ones with `--add`.
| `Core` | yes | Developer-vs-CI switch, solution and git roots, branch, `TargetFramework(s)` switching, Roslyn project-type detection |
| `Trunk` (`DragoAnt.MSBuildKit`) | yes | Language defaults, product and copyright, the version engine, global usings, reference audits |
| `Vcs.GitHub` | yes | Maps `GITHUB_*` variables: CI detection, run number, release tag, pull-request number, repository URL |
| `TfmConstants` | yes | `IsNET8` … `IsNET14`, `IsNET8_OR_GREATER` …, `IsNETSTANDARD` for conditions |
| `TfmConstants` | yes | `IsNET8` … `IsNET14`, `IsNET8_OR_GREATER` …, `IsNETSTANDARD` for conditions; final in item and target conditions and `Directory.Build.targets`, in the props phase only once the framework is known (an inner build of a multi-targeted project) |
| `Packaging` | yes | nuget.org metadata defaults and the `MSKIT_PKG` checks |
| `Testing`, `Testing.XUnit.v3` | yes | Test-project detection, Microsoft.Testing.Platform, coverage, TRX, xUnit v3 |
| `Locals.Secrets`, `Locals.DirectorySecrets`, `Locals.Compile` | yes | Local-only secrets and source files kept outside the repository |
Expand Down Expand Up @@ -103,7 +103,7 @@ Defaults apply to projects with `IsPackable=True` and yield to any value you set
| `PackageIcon` | `.toolkit/res/package.icon.png` (128×128), packed as `icon.png` | [icon](https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#icon) |
| `PackageReadmeFile` | generated from `MSKit_PackageReadmeFrom` ([package readme](./docs/package-readme.md)), else `package.readme.md` (else `README.md`) next to the csproj, packed as `readme.md` | [README](https://learn.microsoft.com/nuget/reference/msbuild-targets#packagereadmefile) |
| `RepositoryUrl`, `PackageProjectUrl` | from `GITHUB_REPOSITORY`, else the git remote via Source Link | [repository](https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#repository-type-and-url) |
| `PackageReleaseNotes` | the GitHub release page of the tag, else the releases page | [release notes](https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#release-notes) |
| `PackageReleaseNotes` | the GitHub release page of the tag, else the releases page; on other hosts, the releases page the generated readme links (`MSKit_PackageReadmeFrom`) | [release notes](https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#release-notes) |
| `PublishRepositoryUrl`, `EmbedUntrackedSources`, `Deterministic`, `ContinuousIntegrationBuild` (CI) | `true` | [Source Link](https://learn.microsoft.com/dotnet/standard/library-guidance/sourcelink) |
| `IncludeSymbols`, `SymbolPackageFormat` | `true`, `snupkg` | [symbols](https://learn.microsoft.com/nuget/create-packages/symbol-packages-snupkg) |
| `EnablePackageValidation` | `true`; baseline from `MSKit_PackageValidationBaselineVersion` | [package validation](https://learn.microsoft.com/dotnet/fundamentals/apicompat/package-validation/overview) |
Expand Down
2 changes: 1 addition & 1 deletion docs/package-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A self-hosted GitLab is recognised through the same item Source Link uses:
| `MSKit_RepoProvider` | detected | `GitHub`, `GitLab`, `AzureDevOps`, `Bitbucket` or `Gitea` |
| `MSKit_RepoBlobUrlTemplate` | the provider's | File links; a `/blob/` in it becomes `/tree/` for folders |
| `MSKit_RepoRawUrlTemplate` | the provider's | Images |
| `MSKit_ReleasesUrl` | `auto` | The release-notes page; empty leaves the link out |
| `MSKit_ReleasesUrl` | `auto` | The release-notes page, also the default `PackageReleaseNotes` off GitHub; empty leaves the link out |
| `MSKit_IssuesUrl` | `auto` | The issues page; empty leaves the link out |
| `MSKit_RepositoryVisibility` | `$(CI_PROJECT_VISIBILITY)` | `private` or `internal` raises `MSKIT_PKG022` |
| `MSKit_GeneratedPackageReadmePath` | `obj/<Configuration>/package.readme.md` | Where the generated file goes |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Text="Package '$(PackageId)' icon is not a $(MSKit_PackageIconSize)x$(MSKit_PackageIconSize) PNG (PNG: $(_MSKit_IconIsPng), size: $(_MSKit_IconWidth)x$(_MSKit_IconHeight))."
Rule="$(_MSKit_PkgRules)#icon" />
<_MSKit_PkgFinding Include="MSKIT_PKG016" Condition="'$(PackageReleaseNotes)'==''"
Text="Package '$(PackageId)' has no PackageReleaseNotes. Set them, or a link to the changelog (on GitHub the kit links the releases page by default)."
Text="Package '$(PackageId)' has no PackageReleaseNotes. Set them, or a link to the changelog (the kit links the releases page by default on GitHub, and on any host the generated readme knows with MSKit_PackageReadmeFrom)."
Rule="$(_MSKit_PkgRules)#release-notes" />
<_MSKit_PkgFinding Include="MSKIT_PKG017" Condition="'$(_MSKit_RelativeLinks)'!=''"
Text="The package README of '$(PackageId)' has relative links, which break on nuget.org: $(_MSKit_RelativeLinks). Use absolute URLs."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<MSKit_PackageReadmeAllowedImageHostsFile Condition="'$(MSKit_PackageReadmeAllowedImageHostsFile)'==''">$(MSBuildThisFileDirectory)nuget.allowed-image-hosts.txt</MSKit_PackageReadmeAllowedImageHostsFile>
<_MSKit_ReadmeStampPath>$(MSKit_GeneratedPackageReadmePath).inputs</_MSKit_ReadmeStampPath>
<_MSKit_ReadmeFindingsBase>$(MSKit_GeneratedPackageReadmePath).findings</_MSKit_ReadmeFindingsBase>
<_MSKit_ReadmeReleasesUrlPath>$(MSKit_GeneratedPackageReadmePath).releases</_MSKit_ReadmeReleasesUrlPath>
</PropertyGroup>

<Target Name="_MSKit_ResolveAllowedImageHosts">
Expand All @@ -28,7 +29,7 @@
<Target Name="MSKit_GeneratePackageReadme"
BeforeTargets="GenerateNuspec"
Condition="'$(_MSKit_GeneratesReadme)'=='True'"
DependsOnTargets="_MSKit_PackageReadmeInputs;_MSKit_WritePackageReadme;_MSKit_ReportPackageReadmeFindings" />
DependsOnTargets="_MSKit_PackageReadmeInputs;_MSKit_WritePackageReadme;_MSKit_ReportPackageReadmeFindings;_MSKit_DefaultReleaseNotesFromReadme" />

<Target Name="_MSKit_PackageReadmeFromMissing"
BeforeTargets="GenerateNuspec"
Expand Down Expand Up @@ -80,6 +81,7 @@
ReadmePath="$(_MSKit_ReadmeFromPath)"
OutputPath="$(MSKit_GeneratedPackageReadmePath)"
FindingsBase="$(_MSKit_ReadmeFindingsBase)"
ReleasesUrlPath="$(_MSKit_ReadmeReleasesUrlPath)"
RepoRoot="$(_MSKit_ReadmeRepoRoot)"
PackageId="$(PackageId)"
RepositoryUrl="$(_MSKit_RepoUrl)"
Expand All @@ -98,6 +100,18 @@
GiteaHosts="@(SourceLinkGiteaHost)" />
</Target>

<!-- Off GitHub, MSKit_ResolvePackageUrls has no release-notes default: use the releases page the
generator resolved, kept beside the generated file like the findings. -->
<Target Name="_MSKit_DefaultReleaseNotesFromReadme"
Condition="'$(PackageReleaseNotes)'=='' AND '$(MSKit_DefaultReleaseNotes)'!='False' AND Exists('$(_MSKit_ReadmeReleasesUrlPath)')">
<ReadLinesFromFile File="$(_MSKit_ReadmeReleasesUrlPath)">
<Output TaskParameter="Lines" PropertyName="_MSKit_ReadmeReleasesUrl" />
</ReadLinesFromFile>
<PropertyGroup>
<PackageReleaseNotes Condition="'$(_MSKit_ReadmeReleasesUrl)'!=''">$(_MSKit_ReadmeReleasesUrl)</PackageReleaseNotes>
</PropertyGroup>
</Target>

<!-- The findings are kept beside the generated file, so an incremental pack still reports them. -->
<Target Name="_MSKit_ReportPackageReadmeFindings" Condition="'$(MSKit_SkipPackageChecks)'!='All' AND '$(MSKit_SkipPackageChecks)'!='True'">
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public sealed class MSKit_PackageAssets : Task

public string OutputPath { get; set; }
public string FindingsBase { get; set; }
public string ReleasesUrlPath { get; set; }
public string RepoRoot { get; set; }
public string PackageId { get; set; }
public string RepositoryUrl { get; set; }
Expand Down Expand Up @@ -410,5 +411,7 @@ public sealed class MSKit_PackageAssets : Task
File.WriteAllText(OutputPath, string.Join("\n", result) + "\n", utf8);
foreach (var code in codes)
File.WriteAllText(FindingsBase + "." + code + ".txt", string.Join("\n", findings[code]) + (findings[code].Count > 0 ? "\n" : ""), utf8);
if (!string.IsNullOrWhiteSpace(ReleasesUrlPath))
File.WriteAllText(ReleasesUrlPath, releasesUrl.Length > 0 ? releasesUrl + "\n" : "", utf8);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)tfm.constants.targets" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<Project>

<!-- tfm.constants.props again, after the csproj body: a single TargetFramework set there is
empty in the props phase. Keep the two definitions identical (tests/tfm-constants.sh). -->
<PropertyGroup>
<IsNETFRAMEWORK></IsNETFRAMEWORK>
<IsNETSTANDARD20></IsNETSTANDARD20>
<IsNETSTANDARD21></IsNETSTANDARD21>
<IsNETSTANDARD></IsNETSTANDARD>
<IsNETFRAMEWORK_OR_STANDARD></IsNETFRAMEWORK_OR_STANDARD>
<IsNET7></IsNET7>
<IsNET8></IsNET8>
<IsNET9></IsNET9>
<IsNET10></IsNET10>
<IsNET11></IsNET11>
<IsNET12></IsNET12>
<IsNET13></IsNET13>
<IsNET14></IsNET14>
<IsNET14_OR_GREATER></IsNET14_OR_GREATER>
<IsNET13_OR_GREATER></IsNET13_OR_GREATER>
<IsNET12_OR_GREATER></IsNET12_OR_GREATER>
<IsNET11_OR_GREATER></IsNET11_OR_GREATER>
<IsNET10_OR_GREATER></IsNET10_OR_GREATER>
<IsNET9_OR_GREATER></IsNET9_OR_GREATER>
<IsNET8_OR_GREATER></IsNET8_OR_GREATER>
<IsNET7_OR_GREATER></IsNET7_OR_GREATER>
<TargetFrameworkVersionMajor></TargetFrameworkVersionMajor>
</PropertyGroup>

<PropertyGroup>
<IsNETFRAMEWORK Condition="'$(TargetFramework)'=='net48'">True</IsNETFRAMEWORK>

<IsNETSTANDARD20 Condition="'$(TargetFramework)'=='netstandard2.0'">True</IsNETSTANDARD20>
<IsNETSTANDARD21 Condition="'$(TargetFramework)'=='netstandard2.1'">True</IsNETSTANDARD21>
<IsNETSTANDARD Condition="'$(IsNETSTANDARD20)'=='True' OR '$(IsNETSTANDARD21)'=='True'">True</IsNETSTANDARD>

<IsNETFRAMEWORK_OR_STANDARD Condition="'$(IsNETFRAMEWORK)'=='True' OR '$(IsNETSTANDARD)'=='True'">True</IsNETFRAMEWORK_OR_STANDARD>

<IsNET7 Condition="'$(TargetFramework)'=='net7.0'">True</IsNET7>
<IsNET8 Condition="'$(TargetFramework)'=='net8.0'">True</IsNET8>
<IsNET9 Condition="'$(TargetFramework)'=='net9.0'">True</IsNET9>
<IsNET10 Condition="'$(TargetFramework)'=='net10.0'">True</IsNET10>
<IsNET11 Condition="'$(TargetFramework)'=='net11.0'">True</IsNET11>
<IsNET12 Condition="'$(TargetFramework)'=='net12.0'">True</IsNET12>
<IsNET13 Condition="'$(TargetFramework)'=='net13.0'">True</IsNET13>
<IsNET14 Condition="'$(TargetFramework)'=='net14.0'">True</IsNET14>

<IsNET14_OR_GREATER Condition="'$(IsNET14)'=='True'">True</IsNET14_OR_GREATER>
<IsNET13_OR_GREATER Condition="'$(IsNET13)'=='True' OR '$(IsNET14_OR_GREATER)'=='True'">True</IsNET13_OR_GREATER>
<IsNET12_OR_GREATER Condition="'$(IsNET12)'=='True' OR '$(IsNET13_OR_GREATER)'=='True'">True</IsNET12_OR_GREATER>
<IsNET11_OR_GREATER Condition="'$(IsNET11)'=='True' OR '$(IsNET12_OR_GREATER)'=='True'">True</IsNET11_OR_GREATER>
<IsNET10_OR_GREATER Condition="'$(IsNET10)'=='True' OR '$(IsNET11_OR_GREATER)'=='True'">True</IsNET10_OR_GREATER>
<IsNET9_OR_GREATER Condition="'$(IsNET9)'=='True' OR '$(IsNET10_OR_GREATER)'=='True'">True</IsNET9_OR_GREATER>
<IsNET8_OR_GREATER Condition="'$(IsNET8)'=='True' OR '$(IsNET9_OR_GREATER)'=='True'">True</IsNET8_OR_GREATER>
<IsNET7_OR_GREATER Condition="'$(IsNET7)'=='True' OR '$(IsNET8_OR_GREATER)'=='True'">True</IsNET7_OR_GREATER>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworkVersionMajor Condition="'$(IsNET7)'=='True'">7</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET8)'=='True'">8</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET9)'=='True'">9</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET10)'=='True'">10</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET11)'=='True'">11</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET12)'=='True'">12</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET13)'=='True'">13</TargetFrameworkVersionMajor>
<TargetFrameworkVersionMajor Condition="'$(IsNET14)'=='True'">14</TargetFrameworkVersionMajor>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions kit/.toolkit/msbuild/init.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- DragoAnt.MSBuildKit targets entry point; Directory.Build.targets imports it. Every
installed part's audit/*.targets is imported last. -->
<Import Project="$(MSKit_BeforeInitTargets)" Condition="'$(MSKit_BeforeInitTargets)' != '' and Exists('$(MSKit_BeforeInitTargets)')" />
<Import Project="$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.TfmConstants/init.targets" Condition="Exists('$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.TfmConstants/init.targets')" />
<Import Project="$(MSBuildThisFileDirectory)init.company.targets" Condition="Exists('$(MSBuildThisFileDirectory)init.company.targets')" />
<Import Project="$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.Core/init.targets" Condition="Exists('$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.Core/init.targets')" />
<Import Project="$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.Locals.Compile/init.targets" Condition="Exists('$(MSBuildThisFileDirectory)DragoAnt.MSBuildKit.Locals.Compile/init.targets')" />
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/TfmConstants/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.toolkit/
5 changes: 5 additions & 0 deletions tests/fixtures/TfmConstants/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory).toolkit/msbuild/init.props" />

</Project>
5 changes: 5 additions & 0 deletions tests/fixtures/TfmConstants/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory).toolkit/msbuild/init.targets" />

</Project>
8 changes: 8 additions & 0 deletions tests/fixtures/TfmConstants/Multi.Tests/Multi.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<FixturePropsPhaseIsNet8 Condition="'$(IsNET8)'=='True'">True</FixturePropsPhaseIsNet8>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions tests/fixtures/TfmConstants/Net10.Tests/Net10.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions tests/fixtures/TfmConstants/Net6.Tests/Net6.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions tests/fixtures/TfmConstants/Net8.Tests/Net8.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions tests/fixtures/TfmConstants/Net9.Tests/Net9.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

</Project>
26 changes: 25 additions & 1 deletion tests/package-readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ rf_count() {
n=$(grep -cF -- "$2" "$out/readme-$1.md" || true)
[ "$n" = "$3" ] && pass "readme $1 has $2 $3 time(s)" || bad "readme $1 has $2 $n time(s), expected $3"
}
rf_notes() {
nupkg=$(ls "$out/readme-$1"/*.nupkg 2>/dev/null | grep -v '\.snupkg$' | head -n 1)
actual=$([ -n "$nupkg" ] && unzip -p "$nupkg" '*.nuspec' | tr -d '\r' | sed -n 's:.*<releaseNotes>\(.*\)</releaseNotes>.*:\1:p')
[ "$actual" = "$2" ] && pass "readme $1 release notes '$actual'" || bad "readme $1 release notes: expected '$2', got '$actual'"
}
generated="$readme_fixture/Observer/obj/Release/package.readme.md"

# Pack only: a build never writes the generated readme.
Expand Down Expand Up @@ -55,7 +60,8 @@ rf_has github "[fenced](./fenced.md)"
rf_has github "<!-- nuget:skip -->"
awk '/^## /{exit} /\[Release notes\]/{found=1} END{exit !found}' "$out/readme-github.md" \
&& pass "readme github: the release-notes link is in the overview" || bad "readme github: the release-notes link is not in the overview"
for code in MSKIT_PKG009 MSKIT_PKG012 MSKIT_PKG017 MSKIT_PKG020 MSKIT_PKG021 MSKIT_PKG022; do rf_quiet github $code; done
for code in MSKIT_PKG009 MSKIT_PKG012 MSKIT_PKG016 MSKIT_PKG017 MSKIT_PKG020 MSKIT_PKG021 MSKIT_PKG022; do rf_quiet github $code; done
rf_notes github "https://github.com/DragoAnt/Fixture/releases"

# Incremental: the same inputs leave the generated file alone; a new commit regenerates it.
stamp1=$(stat -c %Y "$generated" 2>/dev/null || echo none)
Expand Down Expand Up @@ -93,12 +99,25 @@ rf_has gitlab "[Release notes](https://gitlab.com/dragoant/sub/fixture/-/release
rf_has gitlab "[Issues](https://gitlab.com/dragoant/sub/fixture/-/issues)"
rf_quiet gitlab MSKIT_PKG021
rf_quiet gitlab MSKIT_PKG017
rf_quiet gitlab MSKIT_PKG016
rf_notes gitlab "https://gitlab.com/dragoant/sub/fixture/-/releases"
rf_pack gitlab-again Observer $gl
rf_quiet gitlab-again MSKIT_PKG016
rf_notes gitlab-again "https://gitlab.com/dragoant/sub/fixture/-/releases"
rf_pack gitlab-no-releases Observer $gl -p:MSKit_ReleasesUrl=
rf_warns gitlab-no-releases MSKIT_PKG016
rf_pack gitlab-no-default Observer $gl -p:MSKit_DefaultReleaseNotes=False
rf_warns gitlab-no-default MSKIT_PKG016
rf_pack gitlab-notes Observer $gl "-p:PackageReleaseNotes=See the changelog."
rf_notes gitlab-notes "See the changelog."

# Self-hosted GitLab recognised through SourceLinkGitLabHost: its raw images are not on nuget.org's list.
rf_pack gitlab-self Observer -p:RepositoryUrl=https://git.example.org/team/fixture -p:RepositoryCommit=$sha -p:FixtureGitLabHost=git.example.org
rf_has gitlab-self "[the guide](https://git.example.org/team/fixture/-/blob/$sha/$rel/docs/guide.md)"
rf_has gitlab-self "![diagram](https://git.example.org/team/fixture/-/raw/$sha/$rel/docs/diagram.png)"
rf_has gitlab-self "[Issues](https://git.example.org/team/fixture/-/issues)"
rf_quiet gitlab-self MSKIT_PKG016
rf_notes gitlab-self "https://git.example.org/team/fixture/-/releases"
rf_warns gitlab-self MSKIT_PKG021
grep "warning MSKIT_PKG021" "$out/readme-gitlab-self.log" | grep -q "line 11" \
&& pass "readme gitlab-self: MSKIT_PKG021 names the README line" || bad "readme gitlab-self: MSKIT_PKG021 does not name line 11"
Expand All @@ -109,7 +128,12 @@ grep "warning MSKIT_PKG021" "$out/readme-gitlab-self.log" | grep -q "img.shields
rf_pack unknown Observer -p:RepositoryUrl=https://code.example.net/team/fixture -p:RepositoryCommit=$sha
rf_warns unknown MSKIT_PKG020
rf_warns unknown MSKIT_PKG017
rf_warns unknown MSKIT_PKG016
rf_has unknown "[the guide](./docs/guide.md)"
rf_pack unknown-releases Observer -p:RepositoryUrl=https://code.example.net/team/fixture -p:RepositoryCommit=$sha \
"-p:MSKit_ReleasesUrl=https://code.example.net/team/fixture/changes"
rf_quiet unknown-releases MSKIT_PKG016
rf_notes unknown-releases "https://code.example.net/team/fixture/changes"

# Overrides: provider, templates, an empty releases URL (link omitted), a custom issues URL.
rf_pack provider Observer -p:RepositoryUrl=https://code.example.net/team/fixture -p:RepositoryCommit=$sha -p:MSKit_RepoProvider=GitLab
Expand Down
Loading
Loading