Skip to content

Commit

Permalink
Fix creation of tool package, update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cklutz committed Oct 22, 2024
1 parent b352294 commit b87c4d9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ Example:

| Build [^1] | Coverage [^2] |
| -----------| --------------|
| [![](https://github.com/cklutz/LockCheck/workflows/Windows/badge.svg)](https://github.com/cklutz/LockCheck/actions?query=workflow%3AWindows) | [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fwindows-net8.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%208.0&suffix=%25)](https://cklutz.github.io/LockCheck/windows-net8.0-release) [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fwindows-net481-release%2FSummary.json&query=%24.summary.linecoverage&label=net%204.8&suffix=%25)](https://cklutz.github.io/LockCheck/windows-net481-release) |
| [![](https://github.com/cklutz/LockCheck/workflows/Ubuntu/badge.svg)](https://github.com/cklutz/LockCheck/actions?query=workflow%3AUbuntu) | [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fubuntu-net8.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%208.0&suffix=%25)](https://cklutz.github.io/LockCheck/ubuntu-net8.0-release) |
| [![](https://github.com/cklutz/LockCheck/workflows/Windows/badge.svg)](https://github.com/cklutz/LockCheck/actions?query=workflow%3AWindows) | [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fwindows-net8.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%208.0&suffix=%25)](https://cklutz.github.io/LockCheck/windows-net8.0-release) [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fwindows-net9.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%209.0&suffix=%25)](https://cklutz.github.io/LockCheck/windows-net9.0-release) [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fwindows-net481-release%2FSummary.json&query=%24.summary.linecoverage&label=net%204.8&suffix=%25)](https://cklutz.github.io/LockCheck/windows-net481-release) |
| [![](https://github.com/cklutz/LockCheck/workflows/Ubuntu/badge.svg)](https://github.com/cklutz/LockCheck/actions?query=workflow%3AUbuntu) | [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fubuntu-net8.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%208.0&suffix=%25)](https://cklutz.github.io/LockCheck/ubuntu-net8.0-release) [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcklutz.github.io%2FLockCheck%2Fubuntu-net9.0-release%2FSummary.json&query=%24.summary.linecoverage&label=net%209.0&suffix=%25)](https://cklutz.github.io/LockCheck/ubuntu-net9.0-release) |





[^1]: A build is done for every supported target framework for that platform (currently for Windows this is .NET 8.0 and .NET Framework 4.8, for Linux/Ubuntu this is .NET 8.0) in every supported configuration (Release and Debug).
[^2]: Code coverage is generated separately for every supported target framework for a platform, but only for the Release configuration. It is updated nightly from the latest build of the main branch.
Expand Down
25 changes: 20 additions & 5 deletions src/LockCheckTool/LockCheckTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable Condition="'$(TargetFramework)' != 'net8.0'">false</IsPackable>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
</PropertyGroup>

<PropertyGroup>
<RollForward>major</RollForward>
<Version>1.0.1</Version>
<PackAsTool>true</PackAsTool>
<ToolCommandName>lockcheck</ToolCommandName>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>lockchecktool</PackageId>
<Authors>cklutz</Authors>
<Description>A tool to list processes locking a given file.</Description>
Expand All @@ -24,4 +22,21 @@
<ProjectReference Include="..\LockCheck\LockCheck.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.143" PrivateAssets="all" />
</ItemGroup>

<Target Name="AdjustPackagingDirectives" AfterTargets="CoreCompile">
<!-- Prevent "error NETSDK1054: only supports .NET Core."
Since we still multi target net481 as well, we'd get this error otherwise.
We cannot set these directly, because they are need to be set for cross-targeting
and not outer builds.
-->
<PropertyGroup>
<PackAsTool Condition="'$(TargetFramework)' == 'net481'">false</PackAsTool>
<IsPackable Condition="'$(TargetFramework)' == 'net481'">false</IsPackable>
<GeneratePackageOnBuild Condition="'$(TargetFramework)' == 'net481'">false</GeneratePackageOnBuild>
</PropertyGroup>
</Target>

</Project>
File renamed without changes.

0 comments on commit b87c4d9

Please sign in to comment.