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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ coverage.*.xml
# Content specific
Content/Library/docs/
Content/Console/docs/
Content/**/package.lock.json
Content/**/packages.lock.json


# fsdocs generated
tmp/
Expand Down
14 changes: 10 additions & 4 deletions Content/Console/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<!--
This file allows overriding of properties for all projects in the directory.
See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
See
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
-->

<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<!-- Package Info -->
<!-- https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target -->
<PropertyGroup>
<PackageTags>f#, fsharp</PackageTags>
<PackageProjectUrl>https://github.com/MyGithubUsername/MyLib.1</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/MyGithubUsername/MyLib.1/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile> <!--https://docs.microsoft.com/en-gb/nuget/reference/msbuild-targets#packagereadmefile -->
<Authors>MyGithubUsername</Authors>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/MyGithubUsername/MyLib.1</RepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

</Project>
11 changes: 8 additions & 3 deletions Content/Console/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -15,14 +15,19 @@
</PropertyGroup>
<ItemGroup>

<!-- Main -->
<PackageVersion Include="FSharp.Core" Version="8.0.403" />
<PackageVersion Include="Argu" Version="6.0" />
<PackageVersion Include="Packaging.Targets" Version="0.1.208" PrivateAssets="All" />

<!-- Tests -->
<PackageVersion Include="Expecto" Version="10.2.2" />
<PackageVersion Include="YoloDev.Expecto.TestSdk" Version="0.15.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Packaging.Targets" Version="0.1.208" PrivateAssets="All" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.0" PrivateAssets="All" />
<PackageVersion Include="altcover" Version="8.2.825" />

<!-- Build -->
<PackageVersion Include="Fake.IO.FileSystem" Version="$(FakeVersion)" />
<PackageVersion Include="Fake.Core.Target" Version="$(FakeVersion)" />
<PackageVersion Include="Fake.Core.ReleaseNotes" Version="$(FakeVersion)" />
Expand All @@ -34,6 +39,6 @@
<PackageVersion Include="Fake.Api.GitHub" Version="$(FakeVersion)" />
<PackageVersion Include="Fake.BuildServer.GitHubActions" Version="$(FakeVersion)" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.441" />
<PackageVersion Include="Argu" Version="6.0" />
<PackageVersion Include="System.Formats.Asn1" Version="6.0.1" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Content/Console/build/build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<PackageReference Include="Fake.BuildServer.GitHubActions" />
<PackageReference Include="MSBuild.StructuredLogger" />
<PackageReference Include="Argu" />
<PackageReference Include="System.Formats.Asn1" />
</ItemGroup>

</Project>
48 changes: 46 additions & 2 deletions Content/Console/src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,56 @@
<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<!-- Load Directory.Build.props from parent directory since they don't automatically import -->
<Import
Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<IsTestProject>false</IsTestProject>
</PropertyGroup>


<!-- Build Quality -->
<PropertyGroup>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/code-generation#deterministic -->
<Deterministic>true</Deterministic>
<!--
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#continuousintegrationbuild -->
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/output#producereferenceassembly -->
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<!--
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#generatedocumentationfile -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!--
https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/overview -->
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>

<!-- Code Quality -->
<PropertyGroup>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/nullable-reference-types#create-the-application-and-enable-nullable-reference-types
https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/#turning-the-feature-on -->
<Nullable>enable</Nullable>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#treatwarningsaserrors -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn)</NoWarn>
</PropertyGroup>

<!-- Dependency Quality -->
<PropertyGroup>
<!-- Since this is a console app, we should only care about all vulnerabilities
https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#configuring-nuget-audit -->
<NuGetAuditMode>all</NuGetAuditMode>
<NuGetAuditLevel>low</NuGetAuditLevel>
<NuGetAudit>true</NuGetAudit>
</PropertyGroup>
</Project>
20 changes: 13 additions & 7 deletions Content/Library/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@

<!--
This file allows overriding of properties for all projects in the directory.
See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
See
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
-->

<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<!-- Package Info -->
<!-- https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target -->
<PropertyGroup>
<PackageTags>f#, fsharp</PackageTags>
<PackageProjectUrl>https://github.com/MyGithubUsername/MyLib.1</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile> <!--https://docs.microsoft.com/en-gb/nuget/reference/msbuild-targets#packagereadmefile -->
<RepositoryType>git</RepositoryType>
<Authors>MyGithubUsername</Authors>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/MyGithubUsername/MyLib.1</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="/" />
<None Include="$(MSBuildThisFileDirectory)LICENSE.md" Pack="true" PackagePath="/" />
</ItemGroup>


<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="/"/>
<None Include="$(MSBuildThisFileDirectory)LICENSE.md" Pack="true" PackagePath="/"/>
</ItemGroup>

</Project>
8 changes: 7 additions & 1 deletion Content/Library/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -16,12 +16,18 @@
<FakeVersion>6.1.3</FakeVersion>
</PropertyGroup>
<ItemGroup>

<!-- Main -->
<PackageVersion Include="FSharp.Core" Version="8.0.403" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.0" />

<!-- Tests -->
<PackageVersion Include="altcover" Version="8.2.825" />
<PackageVersion Include="Expecto" Version="10.2.2" />
<PackageVersion Include="YoloDev.Expecto.TestSdk" Version="0.15.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />

<!-- Build -->
<PackageVersion Include="Fake.IO.FileSystem" Version="$(FakeVersion)" />
<PackageVersion Include="Fake.Core.Target" Version="$(FakeVersion)" />
<PackageVersion Include="Fake.Core.ReleaseNotes" Version="$(FakeVersion)" />
Expand Down
7 changes: 5 additions & 2 deletions Content/Library/build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ let environVarAsBoolOrDefault varName defaultValue =
//-----------------------------------------------------------------------------

let rootDirectory =
__SOURCE_DIRECTORY__
</> ".."
IO.Path.GetFullPath(
__SOURCE_DIRECTORY__
</> ".."
)

let productName = "MyLib.1"

Expand Down Expand Up @@ -121,6 +123,7 @@ let changelogPath =
rootDirectory
</> changelogFile


let changelog = Fake.Core.Changelog.load changelogPath

let mutable latestEntry =
Expand Down
59 changes: 54 additions & 5 deletions Content/Library/src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,68 @@
<Project>
<ItemGroup>
<!-- Dotnet Watch to know about this file -->
<Watch Include="$(MSBuildThisFileFullPath)"/>
<Watch Include="$(MSBuildThisFileFullPath)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<!-- Load Directory.Build.props from parent directory since they don't automatically import -->
<Import
Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Tell dotnet that anything under src should be packable -->
<IsPackable>true</IsPackable>
<!-- Tell dotnet that anything under src is not a test project -->
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<!-- Sourcelink -->
<!-- Sourcelink
https://devblogs.microsoft.com/dotnet/producing-packages-with-source-link/-->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AllowedOutputExtensionsInPackageBuildOutputFolder>
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<!-- Build Quality -->
<PropertyGroup>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/code-generation#deterministic -->
<Deterministic>true</Deterministic>
<!--
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#continuousintegrationbuild -->
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/output#producereferenceassembly -->
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<!--
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#generatedocumentationfile -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!--
https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/overview -->
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>

<!-- Code Quality -->
<PropertyGroup>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/nullable-reference-types#create-the-application-and-enable-nullable-reference-types
https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/#turning-the-feature-on -->
<Nullable>enable</Nullable>
<!--
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#treatwarningsaserrors -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn)</NoWarn>
</PropertyGroup>

<!-- Dependency Quality -->
<PropertyGroup>
<!-- Since this is a library, we should only care about direct vulnerabilities
https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages-->
<NuGetAuditMode>direct</NuGetAuditMode>
<NuGetAuditLevel>low</NuGetAuditLevel>
<NuGetAudit>true</NuGetAudit>
</PropertyGroup>

</Project>
Loading