Skip to content

Commit 103fb5e

Browse files
migrate fake build script to a build project, update to new dotnet sdk (7 for now) (fsprojects#435)
* migrate fake build script to a build project, update to new dotnet sdk (7 for now) * dotnet tools manifest * try another dotnet sdk for appveyor * oops, was still on vs 2017 on appveyor * sql 2019 on appveyor * missing build.fsproj * missing paket.references * fake needs --target now * adjust for warning as errors to not kill the build due to nuget warnings * adjust test projects to not include the .props stuff for now, also net462 instead of 461, netcoreapp3.1 instead of netcoreapp2.0 * provision for TypeProvider SDK having warnings right now * one more warning not as errors for type provider SDK * adjust the GenerateDocs to use fsianycpu, there seems to be a regression in dotnet fsi that causes "error FS0239: An implementation of the file or module 'FSI_0002_FSharp.Formatting$fsx' has already been given" * attempt to locate fsianycpu.exe for doc generation
1 parent 4ff78e2 commit 103fb5e

19 files changed

+1935
-659
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "8.0.0",
7+
"commands": [
8+
"paket"
9+
]
10+
}
11+
}
12+
}

Directory.Build.props

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project>
2+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
3+
<!--
4+
note: tolerate obsolete calls
5+
-->
6+
<WarningsNotAsErrors>$(WarningsNotAsErrors);44;</WarningsNotAsErrors>
7+
<LangVersion>latest</LangVersion>
8+
</PropertyGroup>
9+
<PropertyGroup>
10+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
11+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
12+
<Deterministic>true</Deterministic>
13+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
14+
<!--
15+
note: preclude few nuget warnings of breaking the build
16+
NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: xxx 4.5.1, xxx 4.8.2.
17+
NU1701: Package 'xxx 14.0.1016.290' was restored using 'yyy' instead of the project target framework 'zzz'. This package may not be fully compatible with your project.
18+
NU1903: Package 'xxx' 2.0.0 has a known moderate severity vulnerability, https://github.com/advisories/xxx
19+
NU1903: Package 'xxx' 2.0.0 has a known high severity vulnerability, https://github.com/advisories/xxx
20+
NU1904: Package 'xxx' 5.0.0 has a known critical severity vulnerability, https://github.com/advisories/xxx
21+
-->
22+
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1504;NU1701;NU1902;NU1903;NU1904</WarningsNotAsErrors>
23+
</PropertyGroup>
24+
</Project>

appveyor.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
init:
22
- git config --global core.autocrlf input
3-
image: Visual Studio 2017
3+
- net start MSSQL$SQL2019
4+
image: Visual Studio 2022
45
build_script:
5-
- cmd: build.cmd GenerateDocs
6+
- cmd: build.cmd --target GenerateDocs
67
test: off
78
version: 0.0.1.{build}
89
artifacts:
910
- path: bin
10-
name: bin
11-
services:
12-
- mssql2014
11+
name: bin

build.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
@echo off
22

3-
.paket\paket.bootstrapper.exe
3+
dotnet tool restore
44
if errorlevel 1 (
55
exit /b %errorlevel%
66
)
77

8-
.paket\paket.exe restore
8+
dotnet paket restore
99
if errorlevel 1 (
1010
exit /b %errorlevel%
1111
)
1212

13-
packages\build\FAKE\tools\FAKE.exe --removeLegacyFakeWarning build.fsx %*
13+
dotnet run --project build %*

build.sh

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,6 @@ set -o pipefail
55

66
cd `dirname $0`
77

8-
FSIARGS=""
9-
OS=${OS:-"unknown"}
10-
if [[ "$OS" != "Windows_NT" ]]
11-
then
12-
FSIARGS="--fsiargs -d:MONO"
13-
fi
14-
15-
function run() {
16-
if [[ "$OS" != "Windows_NT" ]]
17-
then
18-
mono "$@"
19-
else
20-
"$@"
21-
fi
22-
}
23-
24-
run .paket/paket.bootstrapper.exe
25-
26-
if [[ "$OS" != "Windows_NT" ]] &&
27-
[ ! -e ~/.config/.mono/certs ]
28-
then
29-
mozroots --import --sync --quiet
30-
fi
31-
32-
run .paket/paket.exe restore
33-
34-
run packages/build/FAKE/tools/FAKE.exe --removeLegacyFakeWarning "$@" $FSIARGS build.fsx
35-
8+
dotnet tool restore
9+
dotnet paket restore
10+
dotnet run --project build "$@"

0 commit comments

Comments
 (0)