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
10 changes: 4 additions & 6 deletions CodeStyle/CodeStyle.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<PackageId>Polyadic.CodeStyle</PackageId>
<PackageTags>analyzers</PackageTags>
<Description>Various analyzers bundled with opinionated configuration</Description>
Expand All @@ -15,13 +15,11 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IDisposableAnalyzers" Version="4.0.2" PrivateAssets="none" />
<PackageReference Include="IDisposableAnalyzers" Version="4.0.8" PrivateAssets="none" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="none" />
</ItemGroup>
<ItemGroup>
<None Include="build\**\*">
<Pack>true</Pack>
<PackagePath>%(Identity)</PackagePath>
</None>
<None Include="build\**\*" Pack="true" PackagePath="%(Identity)" />
<None Include="buildMultiTargeting\**\*" Pack="true" PackagePath="%(Identity)" />
</ItemGroup>
</Project>
13 changes: 2 additions & 11 deletions CodeStyle/build/Polyadic.CodeStyle.targets
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_PolyadicCodeStylePreventLocalPack" BeforeTargets="Pack" Condition="'$(ContinuousIntegrationBuild)' != 'true' And '$(IsPackable)' == 'true'">
<PropertyGroup>
<_WorkflowUrl>$(PackageProjectUrl)/actions?query=branch%253Amain</_WorkflowUrl>
<_LinkPrefix>%1b]8;;</_LinkPrefix>
<_LinkInfix>%1b\</_LinkInfix>
<_LinkSuffix>$(_LinkPrefix)$(_LinkInfix)</_LinkSuffix>
</PropertyGroup>
<Error Text="Do not publish locally built packages to NuGet.org.
Download the artifacts $(_LinkPrefix)$(_WorkflowUrl)$(_LinkInfix)published on GitHub Actions$(_LinkSuffix) instead.
You can alternatively run `dotnet pack /p:ContinuousIntegrationBuild=true`." />
</Target>
<!-- Only run when we're not a multi-targeting project as that is covered by buildMultiTargeting/Polyadic.CodeStyle.targets. -->
<Import Project="$(MSBuildThisFileDirectory)PreventLocalPack.targets" Condition="'$(TargetFrameworks)' == ''" />
</Project>
15 changes: 15 additions & 0 deletions CodeStyle/build/PreventLocalPack.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_PolyadicCodeStylePreventLocalPack" BeforeTargets="Pack"
Condition="'$(ContinuousIntegrationBuild)' != 'true' And '$(IsPackable)' == 'true' And '$(ApiCompatGenerateSuppressionFile)' != 'true'">
<PropertyGroup>
<_WorkflowUrl>$(PackageProjectUrl)/actions?query=branch%253Amain</_WorkflowUrl>
<_LinkPrefix>%1b]8;;</_LinkPrefix>
<_LinkInfix>%1b\</_LinkInfix>
<_LinkSuffix>$(_LinkPrefix)$(_LinkInfix)</_LinkSuffix>
</PropertyGroup>
<Error Text="Do not publish locally built packages to NuGet.org.
Download the artifacts $(_LinkPrefix)$(_WorkflowUrl)$(_LinkInfix)published on GitHub Actions$(_LinkSuffix) instead.
You can alternatively run `dotnet pack /p:ContinuousIntegrationBuild=true`." />
</Target>
</Project>
4 changes: 4 additions & 0 deletions CodeStyle/buildMultiTargeting/Polyadic.CodeStyle.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)..\build\PreventLocalPack.targets" />
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shared Code Style for all Polyadic/Funcky projects.

## Usage

```
```xml
<PackageReference Include="Polyadic.CodeStyle" Version="..." />
```

Expand Down
20 changes: 20 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# Changelog
## 1.1.0
* Disallow packing without enabling `ContinuousIntegrationBuild`.
* Update `IDisposableAnalyzers` from 4.0.2 to 4.0.8. \
Excerpt from their [Release Notes](https://github.com/DotNetAnalyzers/IDisposableAnalyzers/blob/master/RELEASE_NOTES.md):
> #### 4.0.7
> BUGFIX: Handle target typed new
>
> #### 4.0.6
> BUGFIX: Handle ref struct
> BUGFIX: Handle target typed new
>
> #### 4.0.5
> BUGFIX: Handle ValueTask
> BUGFIX: awaited in expression
>
> #### 4.0.3
> * BUGFIX: Handle recursive builder

## 1.0.0
Initial release