Skip to content

Commit

Permalink
Merge template/faithlife-build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed Jan 12, 2024
2 parents 9ee6016 + b20ef3a commit c6812c4
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 60 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ resharper_comment_typo_highlighting = none
resharper_identifier_typo_highlighting = none
resharper_string_literal_typo_highlighting = none

[Directory.Packages.props]
insert_final_newline = false

[dotnet-tools.json]
insert_final_newline = false

Expand Down Expand Up @@ -83,6 +86,7 @@ csharp_style_prefer_local_over_anonymous_function = true : suggestion
csharp_style_prefer_not_pattern = true : suggestion
csharp_style_prefer_null_check_over_type_check = true : suggestion
csharp_style_prefer_pattern_matching = true : suggestion
csharp_style_prefer_primary_constructors = true : suggestion
csharp_style_prefer_range_operator = true : suggestion
csharp_style_prefer_switch_expression = true : suggestion
csharp_style_prefer_tuple_swap = true : warning
Expand Down Expand Up @@ -199,6 +203,7 @@ dotnet_diagnostic.IDE0160.severity = suggestion
dotnet_diagnostic.IDE0161.severity = suggestion
dotnet_diagnostic.IDE0170.severity = suggestion
dotnet_diagnostic.IDE0180.severity = warning
dotnet_diagnostic.IDE0290.severity = suggestion
dotnet_diagnostic.IDE1005.severity = suggestion
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1003.severity = none
Expand Down Expand Up @@ -322,6 +327,7 @@ resharper_arrange_missing_parentheses_highlighting = hint
resharper_arrange_trailing_comma_in_multiline_lists_highlighting = warning
resharper_comment_typo_highlighting = none
resharper_compare_of_floats_by_equality_operator_highlighting = suggestion
resharper_convert_to_primary_constructor_highlighting = hint
resharper_csharp_align_first_arg_by_paren = false
resharper_csharp_align_linq_query = false
resharper_csharp_align_multiline_argument = false
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- 'master'
tags-ignore:
- '**'
branches: [master]
tags-ignore: ['**']
pull_request:
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

defaults:
run:
shell: pwsh

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up .NET 7
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check out code
uses: actions/checkout@v3
- name: Restore
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jobs:
publish-docs:
runs-on: windows-latest
steps:
- name: Set up .NET 7
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check out code
uses: actions/checkout@v3
- name: Publish Docs
Expand Down
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
.vs/
.idea/
artifacts/
bin/
obj/
release/
.vs/
.idea/
Thumbs.db

*.cache
*.user
*.userprefs
*.log
*.ncrunchproject
*.ncrunchsolution
*.user
launchSettings.json
nCrunchTemp*
_ReSharper*
.DS_Store
19 changes: 10 additions & 9 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

<PropertyGroup>
<VersionPrefix>0.1.1</VersionPrefix>
<LangVersion>11.0</LangVersion>
<PackageValidationBaselineVersion>0.1.0</PackageValidationBaselineVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);1591;1998;NU5105</NoWarn>
<NoWarn>$(NoWarn);1591;1998;NU1507;NU5105</NoWarn>
<NeutralLanguage>en-US</NeutralLanguage>
<DebugType>embedded</DebugType>
<GitHubOrganization>Faithlife</GitHubOrganization>
<RepositoryName>FaithlifeDataAnnotations</RepositoryName>
Expand All @@ -19,22 +21,21 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest-all</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<SelfContained>false</SelfContained>
<UseArtifactsOutput>true</UseArtifactsOutput>
<EnableStrictModeForCompatibleFrameworksInPackageValidation>true</EnableStrictModeForCompatibleFrameworksInPackageValidation>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
<DisablePackageBaselineValidation Condition=" $(PackageValidationBaselineVersion) == $(VersionPrefix) or $(PackageValidationBaselineVersion) == '0.0.0' ">true</DisablePackageBaselineValidation>
</PropertyGroup>

<PropertyGroup Condition=" '$(BuildNumber)' != '' ">
<AssemblyVersion>$(VersionPrefix).$(BuildNumber)</AssemblyVersion>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Faithlife.Analyzers" Version="1.4.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>

</Project>
16 changes: 16 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="XmlDocMarkdown.Core" Version="2.9.0" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Faithlife.Analyzers" Version="1.4.0" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
</ItemGroup>
</Project>
53 changes: 27 additions & 26 deletions FaithlifeDataAnnotations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,57 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faithlife.DataAnnotations", "src\Faithlife.DataAnnotations\Faithlife.DataAnnotations.csproj", "{E1BF8BA1-9E9D-4E27-83FC-777B8D14F806}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faithlife.DataAnnotations", "src\Faithlife.DataAnnotations\Faithlife.DataAnnotations.csproj", "{1F75E8CE-F59A-4738-81EC-17B71C125A06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faithlife.DataAnnotations.Tests", "tests\Faithlife.DataAnnotations.Tests\Faithlife.DataAnnotations.Tests.csproj", "{DF559AD1-5287-43B1-AB47-61B6F342B0FE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faithlife.DataAnnotations.Tests", "tests\Faithlife.DataAnnotations.Tests\Faithlife.DataAnnotations.Tests.csproj", "{3506DA15-B470-42E7-B897-D436451CBC32}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{028A6C6D-8F8F-4A91-A063-45FFCF892109}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "tools\Build\Build.csproj", "{9BB3C85C-100E-4128-A9AF-8F697D753538}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocGen", "tools\XmlDocGen\XmlDocGen.csproj", "{0A5C4B36-610E-4451-BD56-86E5C8A52C42}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A21957E2-3EB8-4CA5-8537-04F60C9F98D5}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
build.ps1 = build.ps1
.github\workflows\build.yaml = .github\workflows\build.yaml
CONTRIBUTING.md = CONTRIBUTING.md
Directory.Build.props = Directory.Build.props
dotnet-tools.json = dotnet-tools.json
Directory.Packages.props = Directory.Packages.props
global.json = global.json
LICENSE = LICENSE
nuget.config = nuget.config
README.md = README.md
ReleaseNotes.md = ReleaseNotes.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "tools\Build\Build.csproj", "{CBD807B4-F49F-4DD1-BC9A-359E90EA913F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocGen", "tools\XmlDocGen\XmlDocGen.csproj", "{EC2B2484-B209-41A2-94E5-4203A9740983}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E1BF8BA1-9E9D-4E27-83FC-777B8D14F806}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1BF8BA1-9E9D-4E27-83FC-777B8D14F806}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1BF8BA1-9E9D-4E27-83FC-777B8D14F806}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1BF8BA1-9E9D-4E27-83FC-777B8D14F806}.Release|Any CPU.Build.0 = Release|Any CPU
{DF559AD1-5287-43B1-AB47-61B6F342B0FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF559AD1-5287-43B1-AB47-61B6F342B0FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF559AD1-5287-43B1-AB47-61B6F342B0FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF559AD1-5287-43B1-AB47-61B6F342B0FE}.Release|Any CPU.Build.0 = Release|Any CPU
{CBD807B4-F49F-4DD1-BC9A-359E90EA913F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBD807B4-F49F-4DD1-BC9A-359E90EA913F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBD807B4-F49F-4DD1-BC9A-359E90EA913F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBD807B4-F49F-4DD1-BC9A-359E90EA913F}.Release|Any CPU.Build.0 = Release|Any CPU
{EC2B2484-B209-41A2-94E5-4203A9740983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC2B2484-B209-41A2-94E5-4203A9740983}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC2B2484-B209-41A2-94E5-4203A9740983}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC2B2484-B209-41A2-94E5-4203A9740983}.Release|Any CPU.Build.0 = Release|Any CPU
{1F75E8CE-F59A-4738-81EC-17B71C125A06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F75E8CE-F59A-4738-81EC-17B71C125A06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F75E8CE-F59A-4738-81EC-17B71C125A06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F75E8CE-F59A-4738-81EC-17B71C125A06}.Release|Any CPU.Build.0 = Release|Any CPU
{3506DA15-B470-42E7-B897-D436451CBC32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3506DA15-B470-42E7-B897-D436451CBC32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3506DA15-B470-42E7-B897-D436451CBC32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3506DA15-B470-42E7-B897-D436451CBC32}.Release|Any CPU.Build.0 = Release|Any CPU
{9BB3C85C-100E-4128-A9AF-8F697D753538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BB3C85C-100E-4128-A9AF-8F697D753538}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BB3C85C-100E-4128-A9AF-8F697D753538}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BB3C85C-100E-4128-A9AF-8F697D753538}.Release|Any CPU.Build.0 = Release|Any CPU
{0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6D621D28-8AB2-41C2-AA99-AE2225542E17}
SolutionGuid = {28CD7BF1-0965-4088-8597-4C08C20C814C}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
1 change: 1 addition & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Description>Helpers for working with DataAnnotations from System.ComponentModel.</Description>
<PackageTags>data annotations</PackageTags>
<IsPackable>true</IsPackable>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand All @@ -13,7 +14,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions tools/Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Faithlife.Build" Version="5.19.0" />
<PackageReference Include="Faithlife.Build" VersionOverride="5.*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions tools/XmlDocGen/XmlDocGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Faithlife.DataAnnotations\Faithlife.DataAnnotations.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="XmlDocMarkdown.Core" Version="2.9.0" />
<PackageReference Include="XmlDocMarkdown.Core" />
</ItemGroup>

</Project>

0 comments on commit c6812c4

Please sign in to comment.