Skip to content

Commit 01b7cae

Browse files
committed
move build to build project
1 parent 8fae7f4 commit 01b7cae

36 files changed

+8216
-633
lines changed

.config/dotnet-tools.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@
88
"reportgenerator"
99
]
1010
},
11-
"fake-cli": {
12-
"version": "5.20.4-alpha.1642",
13-
"commands": [
14-
"fake"
15-
]
16-
},
1711
"paket": {
18-
"version": "6.0.0-beta8",
12+
"version": "6.2.1",
1913
"commands": [
2014
"paket"
2115
]
@@ -31,6 +25,12 @@
3125
"commands": [
3226
"fsharp-analyzers"
3327
]
28+
},
29+
"fantomas": {
30+
"version": "5.0.1",
31+
"commands": [
32+
"fantomas"
33+
]
3434
}
3535
}
3636
}

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@ indent_style = space
1313
indent_size = 4
1414

1515
[*.{fs,fsi,fsx,config}]
16+
# https://fsprojects.github.io/fantomas/docs/end-users/Configuration.html
1617
charset = utf-8
1718
trim_trailing_whitespace = true
19+
max_line_length=100
20+
fsharp_multiline_block_brackets_on_same_column=true
21+
fsharp_experimental_stroustrup_style=true
22+
fsharp_keep_max_number_of_blank_lines=2
23+
fsharp_max_array_or_list_number_of_items=1
24+
fsharp_array_or_list_multiline_formatter=number_of_items
25+
fsharp_max_infix_operator_expression=10
26+
fsharp_multi_line_lambda_closing_newline=true
27+
1828

1929
[paket.*]
2030
trim_trailing_whitespace = true

.paket/Paket.Restore.targets

+71-8
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
This value should match the version in the props generated by paket
160160
If they differ, this means we need to do a restore in order to ensure correct dependencies
161161
-->
162-
<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.185.3' ">
162+
<PropertyGroup Condition="'$(PaketPropsVersion)' != '6.0.0' ">
163163
<PaketRestoreRequired>true</PaketRestoreRequired>
164164
</PropertyGroup>
165165

@@ -236,13 +236,16 @@
236236
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238238
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239-
<CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
239+
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240+
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241+
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
240242
</PaketReferencesFileLinesInfo>
241243
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
242244
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
243245
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
244-
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
245-
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
246+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
247+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
248+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.ImportTargets) == 'false'">$(ExcludeAssets);build;buildMultitargeting;buildTransitive</ExcludeAssets>
246249
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
247250
<AllowExplicitVersion>true</AllowExplicitVersion>
248251
</PackageReference>
@@ -289,14 +292,16 @@
289292
<PropertyGroup>
290293
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
291294
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
295+
<UseMSBuild16_10_Pack>false</UseMSBuild16_10_Pack>
296+
<UseMSBuild16_10_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND '@(MSBuildMinorVersion)' > '10' ">true</UseMSBuild16_10_Pack>
292297
<UseMSBuild16_0_Pack>false</UseMSBuild16_0_Pack>
293-
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' ">true</UseMSBuild16_0_Pack>
298+
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild16_0_Pack>
294299
<UseMSBuild15_9_Pack>false</UseMSBuild15_9_Pack>
295300
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8' ">true</UseMSBuild15_9_Pack>
296301
<UseMSBuild15_8_Pack>false</UseMSBuild15_8_Pack>
297-
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseMSBuild15_8_Pack>
302+
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild15_8_Pack>
298303
<UseNuGet4_Pack>false</UseNuGet4_Pack>
299-
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseNuGet4_Pack>
304+
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseNuGet4_Pack>
300305
<AdjustedNuspecOutputPath>$(PaketIntermediateOutputPath)\$(Configuration)</AdjustedNuspecOutputPath>
301306
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(PaketIntermediateOutputPath)</AdjustedNuspecOutputPath>
302307
</PropertyGroup>
@@ -314,6 +319,55 @@
314319
</ConvertToAbsolutePath>
315320

316321
<!-- Call Pack -->
322+
<PackTask Condition="$(UseMSBuild16_10_Pack)"
323+
PackItem="$(PackProjectInputFile)"
324+
PackageFiles="@(_PackageFiles)"
325+
PackageFilesToExclude="@(_PackageFilesToExclude)"
326+
PackageVersion="$(PackageVersion)"
327+
PackageId="$(PackageId)"
328+
Title="$(Title)"
329+
Authors="$(Authors)"
330+
Description="$(Description)"
331+
Copyright="$(Copyright)"
332+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
333+
LicenseUrl="$(PackageLicenseUrl)"
334+
ProjectUrl="$(PackageProjectUrl)"
335+
IconUrl="$(PackageIconUrl)"
336+
ReleaseNotes="$(PackageReleaseNotes)"
337+
Tags="$(PackageTags)"
338+
DevelopmentDependency="$(DevelopmentDependency)"
339+
BuildOutputInPackage="@(_BuildOutputInPackage)"
340+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
341+
SymbolPackageFormat="$(SymbolPackageFormat)"
342+
TargetFrameworks="@(_TargetFrameworks)"
343+
AssemblyName="$(AssemblyName)"
344+
PackageOutputPath="$(PackageOutputAbsolutePath)"
345+
IncludeSymbols="$(IncludeSymbols)"
346+
IncludeSource="$(IncludeSource)"
347+
PackageTypes="$(PackageType)"
348+
IsTool="$(IsTool)"
349+
RepositoryUrl="$(RepositoryUrl)"
350+
RepositoryType="$(RepositoryType)"
351+
SourceFiles="@(_SourceFiles->Distinct())"
352+
NoPackageAnalysis="$(NoPackageAnalysis)"
353+
MinClientVersion="$(MinClientVersion)"
354+
Serviceable="$(Serviceable)"
355+
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
356+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
357+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
358+
IncludeBuildOutput="$(IncludeBuildOutput)"
359+
BuildOutputFolders="$(BuildOutputTargetFolder)"
360+
ContentTargetFolders="$(ContentTargetFolders)"
361+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
362+
NuspecFile="$(NuspecFileAbsolutePath)"
363+
NuspecBasePath="$(NuspecBasePath)"
364+
NuspecProperties="$(NuspecProperties)"
365+
PackageLicenseFile="$(PackageLicenseFile)"
366+
PackageLicenseExpression="$(PackageLicenseExpression)"
367+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
368+
Readme="$(PackageReadmeFile)"
369+
NoDefaultExcludes="$(NoDefaultExcludes)"/>
370+
317371
<PackTask Condition="$(UseMSBuild16_0_Pack)"
318372
PackItem="$(PackProjectInputFile)"
319373
PackageFiles="@(_PackageFiles)"
@@ -343,6 +397,8 @@
343397
IsTool="$(IsTool)"
344398
RepositoryUrl="$(RepositoryUrl)"
345399
RepositoryType="$(RepositoryType)"
400+
RepositoryBranch="$(RepositoryBranch)"
401+
RepositoryCommit="$(RepositoryCommit)"
346402
SourceFiles="@(_SourceFiles->Distinct())"
347403
NoPackageAnalysis="$(NoPackageAnalysis)"
348404
MinClientVersion="$(MinClientVersion)"
@@ -359,7 +415,8 @@
359415
NuspecProperties="$(NuspecProperties)"
360416
PackageLicenseFile="$(PackageLicenseFile)"
361417
PackageLicenseExpression="$(PackageLicenseExpression)"
362-
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />
418+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
419+
NoDefaultExcludes="$(NoDefaultExcludes)" />
363420

364421
<PackTask Condition="$(UseMSBuild15_9_Pack)"
365422
PackItem="$(PackProjectInputFile)"
@@ -390,6 +447,8 @@
390447
IsTool="$(IsTool)"
391448
RepositoryUrl="$(RepositoryUrl)"
392449
RepositoryType="$(RepositoryType)"
450+
RepositoryBranch="$(RepositoryBranch)"
451+
RepositoryCommit="$(RepositoryCommit)"
393452
SourceFiles="@(_SourceFiles->Distinct())"
394453
NoPackageAnalysis="$(NoPackageAnalysis)"
395454
MinClientVersion="$(MinClientVersion)"
@@ -433,6 +492,8 @@
433492
IsTool="$(IsTool)"
434493
RepositoryUrl="$(RepositoryUrl)"
435494
RepositoryType="$(RepositoryType)"
495+
RepositoryBranch="$(RepositoryBranch)"
496+
RepositoryCommit="$(RepositoryCommit)"
436497
SourceFiles="@(_SourceFiles->Distinct())"
437498
NoPackageAnalysis="$(NoPackageAnalysis)"
438499
MinClientVersion="$(MinClientVersion)"
@@ -475,6 +536,8 @@
475536
IsTool="$(IsTool)"
476537
RepositoryUrl="$(RepositoryUrl)"
477538
RepositoryType="$(RepositoryType)"
539+
RepositoryBranch="$(RepositoryBranch)"
540+
RepositoryCommit="$(RepositoryCommit)"
478541
SourceFiles="@(_SourceFiles->Distinct())"
479542
NoPackageAnalysis="$(NoPackageAnalysis)"
480543
MinClientVersion="$(MinClientVersion)"

TheAngryByrd.TypeSafeInternals.sln

+14
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TheAngryByrd.Myriad.Plugins
2222
EndProject
2323
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TheAngryByrd.Myriad.Plugins.TypeSafeInternals.Tests", "tests\TheAngryByrd.Myriad.Plugins.TypeSafeInternals.Tests\TheAngryByrd.Myriad.Plugins.TypeSafeInternals.Tests.fsproj", "{C617B88E-FF8D-4ACF-AE8A-5D95676A9CDC}"
2424
EndProject
25+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "build", "build\build.fsproj", "{85C7A212-E7E2-454F-9C75-3C324B4EF007}"
26+
EndProject
2527
Global
2628
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2729
Debug|Any CPU = Debug|Any CPU
@@ -95,6 +97,18 @@ Global
9597
{C617B88E-FF8D-4ACF-AE8A-5D95676A9CDC}.Release|x64.Build.0 = Release|Any CPU
9698
{C617B88E-FF8D-4ACF-AE8A-5D95676A9CDC}.Release|x86.ActiveCfg = Release|Any CPU
9799
{C617B88E-FF8D-4ACF-AE8A-5D95676A9CDC}.Release|x86.Build.0 = Release|Any CPU
100+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
101+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|Any CPU.Build.0 = Debug|Any CPU
102+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|x64.ActiveCfg = Debug|Any CPU
103+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|x64.Build.0 = Debug|Any CPU
104+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|x86.ActiveCfg = Debug|Any CPU
105+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Debug|x86.Build.0 = Debug|Any CPU
106+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|Any CPU.ActiveCfg = Release|Any CPU
107+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|Any CPU.Build.0 = Release|Any CPU
108+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|x64.ActiveCfg = Release|Any CPU
109+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|x64.Build.0 = Release|Any CPU
110+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|x86.ActiveCfg = Release|Any CPU
111+
{85C7A212-E7E2-454F-9C75-3C324B4EF007}.Release|x86.Build.0 = Release|Any CPU
98112
EndGlobalSection
99113
GlobalSection(NestedProjects) = preSolution
100114
{5D30E174-2538-47AC-8443-318C8C5DC2C9} = {C397A34C-84F1-49E7-AEBC-2F9F2B196216}

build.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
echo Restoring dotnet tools...
22
dotnet tool restore
33

4-
dotnet fake build -t %*
4+
dotnet run --project ./build/build.fsproj -- -t %*

build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
2+
# -*- coding: utf-8 -*-
23

34
set -eu
45
set -o pipefail
56

67
echo "Restoring dotnet tools..."
78
dotnet tool restore
89

9-
PAKET_SKIP_RESTORE_TARGETS=true FAKE_DETAILED_ERRORS=true dotnet fake build -t "$@"
10+
FAKE_DETAILED_ERRORS=true dotnet run --project ./build/build.fsproj -- -t "$@"

0 commit comments

Comments
 (0)