Skip to content

Commit

Permalink
Update packaging options
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalBrylka committed Jan 2, 2024
1 parent c1aa684 commit dd241db
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/license-scanning.yml
Expand Up @@ -6,6 +6,8 @@ on:
branches:
- '*'

run-name: "License Scanning"

defaults:
run:
shell: pwsh
Expand All @@ -18,8 +20,6 @@ jobs:
steps:
- name: Checkout tree
uses: actions/checkout@v4



- name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@v3
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/Benchmarks.csproj
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<None Include="..\Nemesis.TextParsers.Public.snk" Link="Nemesis.TextParsers.Public.snk">
<None Include="..\Nemesis.Public.snk" Link="Nemesis.Public.snk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
84 changes: 70 additions & 14 deletions Directory.Build.props
@@ -1,38 +1,86 @@
<Project>
<PropertyGroup Label="CI" Condition="'$(CI)' == ''">
<CI>false</CI>
<!-- GH, CircleCI, GitLab and BitBucket already use CI -->
<CI Condition="'$(TF_BUILD)' == 'true' or '$(TEAMCITY_VERSION)' != '' or '$(APPVEYOR)' != '' or
'$(BuildRunner)' == 'MyGet' or '$(JENKINS_URL)' != '' or '$(TRAVIS)' == 'true' or
'$(BUDDY)' == 'true'">true</CI>
</PropertyGroup>

<PropertyGroup>
<!-- The Microsoft.Managed.Core.targets use this property to use deterministic source paths in CI builds -->
<ContinuousIntegrationBuild>$(CI)</ContinuousIntegrationBuild>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

<!--this will be patched by build system-->
<PackageReleaseNotes>RELEASE_NOTES_PLACEHOLDER</PackageReleaseNotes>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<GenerateRepositoryUrlAttribute>true</GenerateRepositoryUrlAttribute>

<!-- Use Directory.Packages.props if possible. NOTE: other MSBuild SDKs (i.e. NoTargets/Traversal) do not support central packages -->
<ManagePackageVersionsCentrally Condition="Exists('$(MSBuildThisFileDirectory)Directory.Packages.props') AND ('$(MSBuildProjectExtension)' == '.csproj' OR '$(MSBuildProjectExtension)' == '.vbproj')">true</ManagePackageVersionsCentrally>

<!-- Ensure MSBuild tooling can access package artifacts always via PKG_[PackageId] -->
<!--<GeneratePathProperty>true</GeneratePathProperty>-->
</PropertyGroup>


<PropertyGroup Label="Build">
<Configuration Condition="'$(Configuration)' == '' and $(CI)">Release</Configuration>

<!--This will get replaced by Build System-->
<Version>0.0.1</Version>

<LangVersion>12.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>

<!--TODO <Nullable>enable</Nullable>-->
<!--Subject to change by project that need to be packed-->
<IsPackable>false</IsPackable>


<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<!--
Condition="$(CI) or '$(Configuration)' == 'Release'"
<WarningsNotAsErrors></WarningsNotAsErrors>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
-->

<!--
TODO
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition="$(MSBuildProjectName.Contains('Tests'))">false</GenerateDocumentationFile>
-->

<!--Public sign-->
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>

<EnableSourceLink>true</EnableSourceLink>
<EnableSourceControlManagerQueries>true</EnableSourceControlManagerQueries>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<UseSourceLink>true</UseSourceLink>
</PropertyGroup>

<PropertyGroup Label="StrongName" Condition="Exists('$(MSBuildThisFileDirectory)Nemesis.Public.snk')">
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Nemesis.Public.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<PublicSign>true</PublicSign>
<AssemblyOriginatorKeyFile>..\Nemesis.TextParsers.Public.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\images\icon.png" Pack="true" PackagePath="properties">
<Link>properties\icon.png</Link>
</None>

<None Include="..\README.md" Pack="true" PackagePath="properties">
<Link>properties\README.md</Link>
</None>
</ItemGroup>



<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="..\.editorconfig" Link="properties\.editorconfig" />
</ItemGroup>

<ItemGroup>
<Using Include="System.Linq.Expressions" />
<Using Include="System.Text" />
Expand All @@ -42,4 +90,12 @@
<Using Include="System.Runtime.CompilerServices" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests, PublicKey=002400000480000014020000060200000024000052534131001000000100010021f3d01159b17f134751b76186015afbfca0f161319ff82c8e192c38ff123c5d6c8e1a2e019ae71fd532a65ede8dd5800a6c10a5968c596e875ca1e5b6059721531bbc2c131b8c7ee8ec26f7cb6936ea11fac3d3fec479608ff773480ae4d25156aac9c4224260620517a00fa696fadea3bda92383b3475b2219be7d9fd4ea6a4ee6be301df7742a402d83ea70465f05947ebe6d307e401138c48304ca6d435a4a3543748057ade49c3423098177eadeae3f7cfdf5958c6dc9eb37d013446678c968bb2a1215f6341957d3029cbee3ce099e04c2f066fc704c5e08b85a74d6f458f5666dc555837635111008c0572138ab2e6e3d4e66a607665d94f48312164ec2b6e2de80769b296b3179e7993334b124dfb17d972902e70233b09a9bac2a15af8d6bd786befcdfddb292521a685c6afa10ab90f0508fbb8dc7d2af6341bcbb854a69a8d1e6372061e62b28057c3b629adb785eab34c13f9034c3d4abea467ae8ce973ed961e04ba9fa65dd481c2faa9185bd3833f478d911298ca41b6a041058acd5c91528f424cf859afc4b9a705f5917a01c5a119ca555f22b559a38195c55361a1a0c12400137263a0574c586c3e81f94a871f4b5380f8a335cfda28fc7cf131c7f32540b6f918cdd8925938163321a7f6c09cfbf807cbb8f0823be60528eaad5d0aee88fcc533715796a4c5ec9e066a5f303dd48cc116b521ccea4c3d2</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
</Project>
42 changes: 25 additions & 17 deletions Directory.Build.targets
@@ -1,8 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />
<ItemGroup Label="NuGet">
<!-- solution-level icon/README -->
<None Include="..\images\icon.png" Pack="true" PackagePath="properties" Link="properties\icon.png"
Condition="Exists('..\images\icon.png') and !Exists('icon.png')"
/>
<None Include="..\README.md" Pack="true" PackagePath="properties" Link="properties\README.md"
Condition="Exists('..\README.md') and !Exists('README.md')"
/>

<!-- Project-level icon/README overrides -->
<None Include="icon.png" Pack="true" PackagePath="properties" Link="properties\icon.png"
Condition="Exists('icon.png')"
/>
<None Include="README.md" Pack="true" PackagePath="properties" Link="properties\README.md"
Condition="Exists('README.md')"
/>
<!--$(MSBuildThisFileDirectory)file, $(MSBuildProjectDirectory)\file-->
</ItemGroup>

<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />

<Target Name="_AppendCommonPackageDescription"
BeforeTargets="InitializeStandardNuspecProperties;GenerateNuspec"
DependsOnTargets="InitializeSourceControlInformation"
Expand All @@ -14,27 +33,16 @@
This package was built from the source at $(RepositoryUrl.TrimEnd('.git'))/tree/$(SourceRevisionId)
</PackageDescription>

<Authors>Michał Bryłka, Leszek Kowalski</Authors>
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
<Copyright>Copyright © Michał Bryłka. Icon by http://www.iconka.com </Copyright>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageProjectUrl>https://github.com/nemesissoft/Nemesis.TextParsers</PackageProjectUrl>

<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>

<PackageIcon>properties\icon.png</PackageIcon>
<PackageReadmeFile>properties\README.md</PackageReadmeFile>

<!--this will be patched by build system-->
<PackageReleaseNotes>RELEASE_NOTES_PLACEHOLDER</PackageReleaseNotes>


<EnablePackageValidation>true</EnablePackageValidation>
<!-- Optional: Detect breaking changes from a previous version -->
<!-- <PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion> -->

<PackageIcon>properties\icon.png</PackageIcon>
<PackageReadmeFile>properties\README.md</PackageReadmeFile>
</PropertyGroup>
</Target>
</Target>
</Project>
5 changes: 1 addition & 4 deletions Directory.Packages.props
@@ -1,7 +1,4 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<Project>
<ItemGroup>

<!--Microsoft-->
Expand Down
11 changes: 11 additions & 0 deletions Directory.props
@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<Authors>Michał Bryłka, Leszek Kowalski</Authors>
<Copyright>Copyright © Michał Bryłka</Copyright>

<PackageProjectUrl>https://github.com/nemesissoft/Nemesis.TextParsers</PackageProjectUrl>

<PackageTags>split stringSplit tokenize token parse format list dictionary TextConverter ReadOnlySpan Span Memory fast allocation noAllocation</PackageTags>
<Description>Contains various parser optimized for speed and no allocation.</Description>
</PropertyGroup>
</Project>
Binary file added Nemesis.Public.snk
Binary file not shown.
12 changes: 3 additions & 9 deletions Nemesis.TextParsers.CodeGen/Nemesis.TextParsers.CodeGen.csproj
Expand Up @@ -11,8 +11,8 @@


<IsPackable>true</IsPackable>
<PackageTags>codegen codegeneration generation trnasformer parse ReadOnlySpan Span Memory fast allocation noAllocation</PackageTags>
<Description>Contains various code generators for parser optimized for speed and no allocation</Description>
<PackageTags>$(PackageTags) codegen codegeneration generation transformer parse</PackageTags>
<Description>Contains various code generators for parser optimized for speed and no allocation</Description>
</PropertyGroup>

<ItemGroup>
Expand All @@ -31,12 +31,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
<PackageReference Include="MinVer" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests, PublicKey=00240000048000001a010000060200000024000052534131300800000100010035c8d69e21b106b1164c8fc9c108ed2c08b283d13af6028fc6d6dd07ddd98039bcd99689793df5eef77230ce0a469dfb3ba7575ec699a6e001224ef90b3ce3437e873f0e5bc267a992a78ce1ecb85545d021f17ce51dccf9b3b2cb418aa9adcd2cf93fcc53ab12cb80a5cd51dcf6f3f3be70777b5dbf6d43dc20801be7f9d8220d8ac1082391647e650ff596673c8cd40257f113c8d59f8b150cebc991eeedc69a9c1d442f93089a276aad3122cf90feafb02a384524fcab4d269de23aa5666c6fcc8b89766455d8e0fe9e65d1034673382c596cc60ee8d1b1b4fedb767ff05d7d6cdae0c0db091c24311ae373f98887826256298d72a772a3a8abee357a28f6a5bb4f4369ab</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</ItemGroup>

</Project>
Binary file added Nemesis.TextParsers.CodeGen/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Nemesis.TextParsers.Public.snk
Binary file not shown.
1 change: 1 addition & 0 deletions Nemesis.TextParsers.sln
Expand Up @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
Directory.props = Directory.props
global.json = global.json
LICENSE.txt = LICENSE.txt
Nemesis.TextParsers.Public.snk = Nemesis.TextParsers.Public.snk
Expand Down
13 changes: 2 additions & 11 deletions Nemesis.TextParsers/Nemesis.TextParsers.csproj
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>

<IsPackable>true</IsPackable>
<PackageTags>split stringSplit tokenize token parse format list dictionary TextConverter ReadOnlySpan Span Memory fast allocation noAllocation</PackageTags>
<Description>Contains various parser optimized for speed and no allocation.</Description>

</PropertyGroup>

<ItemGroup>
Expand All @@ -26,13 +24,6 @@
<PackageReference Include="System.Memory" />
</ItemGroup>

<!--Legacy off-->


<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests, PublicKey=00240000048000001a010000060200000024000052534131300800000100010035c8d69e21b106b1164c8fc9c108ed2c08b283d13af6028fc6d6dd07ddd98039bcd99689793df5eef77230ce0a469dfb3ba7575ec699a6e001224ef90b3ce3437e873f0e5bc267a992a78ce1ecb85545d021f17ce51dccf9b3b2cb418aa9adcd2cf93fcc53ab12cb80a5cd51dcf6f3f3be70777b5dbf6d43dc20801be7f9d8220d8ac1082391647e650ff596673c8cd40257f113c8d59f8b150cebc991eeedc69a9c1d442f93089a276aad3122cf90feafb02a384524fcab4d269de23aa5666c6fcc8b89766455d8e0fe9e65d1034673382c596cc60ee8d1b1b4fedb767ff05d7d6cdae0c0db091c24311ae373f98887826256298d72a772a3a8abee357a28f6a5bb4f4369ab</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!--Legacy off-->

</Project>
Binary file added images/CodeGen.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/NTP.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd241db

Please sign in to comment.