Skip to content

Commit 0f894ca

Browse files
authored
Merge pull request #37 from SaturnFramework/cartermp.net6
2 parents f79567d + ebba66a commit 0f894ca

33 files changed

+958
-1821
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "5.243.0",
6+
"version": "7.0.2",
77
"commands": [
88
"paket"
99
]
10-
},
11-
"fake-cli": {
12-
"version": "5.19.1",
13-
"commands": [
14-
"fake"
15-
]
1610
}
1711
}
1812
}

.github/workflows/build.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
strategy:
9+
matrix:
10+
os: [windows-latest, macos-latest, ubuntu-latest]
11+
dotnet: [6.0.200]
12+
runs-on: ${{ matrix.os }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: ${{ matrix.dotnet }}
21+
- name: Restore tools
22+
run: dotnet tool restore
23+
- name: Build
24+
run: dotnet run --project build/Build.fsproj

.github/workflows/push.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Publish on any new tag starting with v
7+
8+
jobs:
9+
build:
10+
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
dotnet: [6.0.200]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Setup .NET Core
22+
uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: ${{ matrix.dotnet }}
25+
26+
- name: Restore tools
27+
run: dotnet tool restore
28+
29+
- name: Publish to NuGet
30+
run: dotnet run --project build/Build.fsproj -- Push
31+
env:
32+
nuget-key: ${{ secrets.NUGET_KEY }}
33+
34+
- name: Upload a Build Artifact
35+
uses: actions/upload-artifact@v2.3.1
36+
with:
37+
path: build
38+
- name: Create Release
39+
uses: ncipollo/release-action@v1
40+
with:
41+
artifacts: build/out/*.nupkg
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
generateReleaseNotes: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ paket-files/
44
nupkg/
55
obj/
66
release.cmd
7-
.ionide/
7+
.ionide/
8+
bin/

.gitpod.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
image: gitpod/workspace-dotnet
2+
3+
vscode:
4+
extensions:
5+
- muhammad-sammy.csharp
6+
- ionide.ionide-fsharp
7+
8+
tasks:
9+
- init: >
10+
dotnet tool restore
11+
dotnet paket restore
12+
dotnet run --project build/Build.fsproj

.paket/Paket.Restore.targets

Lines changed: 123 additions & 47 deletions
Large diffs are not rendered by default.

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"yaml.schemas": {
3+
"https://json.schemastore.org/github-workflow.json": "file:///workspace/Saturn.Template/.github/workflows/build.yaml"
4+
}
5+
}

Content/.config/dotnet-tools.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "5.243.0",
6+
"version": "7.0.2",
77
"commands": [
88
"paket"
99
]
1010
},
11-
"fake-cli": {
12-
"version": "5.19.1",
13-
"commands": [
14-
"fake"
15-
]
16-
},
1711
"saturn.cli": {
18-
"version": "0.12.1",
12+
"version": "1.0.4",
1913
"commands": [
2014
"saturn"
2115
]

Content/.paket/Paket.Restore.targets

Lines changed: 71 additions & 8 deletions
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)"

Content/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### How to build application
22

3-
1. Make sure you have installed version of .Net SDK defined in `global.json`
3+
1. Make sure you have installed version of .NET SDK defined in `global.json`
44
2. Run `dotnet tool restore` to restore all necessary tools
55
3. Run `dotnet saturn migration` to create sqlite database
66
3. Run `dotnet fake build -t Run` to start application in watch mode (automatic recompilation and restart at file save)

0 commit comments

Comments
 (0)