Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate fake build script to a build project, update to new dotnet sdk (7 for now) #435

Merged
merged 14 commits into from
Dec 5, 2023
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
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"paket": {
"version": "8.0.0",
"commands": [
"paket"
]
}
}
}
24 changes: 24 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
<!--
note: tolerate obsolete calls
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);44;</WarningsNotAsErrors>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Deterministic>true</Deterministic>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
note: preclude few nuget warnings of breaking the build
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.
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.
NU1903: Package 'xxx' 2.0.0 has a known moderate severity vulnerability, https://github.com/advisories/xxx
NU1903: Package 'xxx' 2.0.0 has a known high severity vulnerability, https://github.com/advisories/xxx
NU1904: Package 'xxx' 5.0.0 has a known critical severity vulnerability, https://github.com/advisories/xxx
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1504;NU1701;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
</Project>
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
init:
- git config --global core.autocrlf input
image: Visual Studio 2017
- net start MSSQL$SQL2019
image: Visual Studio 2022
build_script:
- cmd: build.cmd GenerateDocs
- cmd: build.cmd --target GenerateDocs
test: off
version: 0.0.1.{build}
artifacts:
- path: bin
name: bin
services:
- mssql2014
name: bin
6 changes: 3 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@echo off

.paket\paket.bootstrapper.exe
dotnet tool restore
if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
dotnet paket restore
if errorlevel 1 (
exit /b %errorlevel%
)

packages\build\FAKE\tools\FAKE.exe --removeLegacyFakeWarning build.fsx %*
dotnet run --project build %*
31 changes: 3 additions & 28 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,6 @@ set -o pipefail

cd `dirname $0`

FSIARGS=""
OS=${OS:-"unknown"}
if [[ "$OS" != "Windows_NT" ]]
then
FSIARGS="--fsiargs -d:MONO"
fi

function run() {
if [[ "$OS" != "Windows_NT" ]]
then
mono "$@"
else
"$@"
fi
}

run .paket/paket.bootstrapper.exe

if [[ "$OS" != "Windows_NT" ]] &&
[ ! -e ~/.config/.mono/certs ]
then
mozroots --import --sync --quiet
fi

run .paket/paket.exe restore

run packages/build/FAKE/tools/FAKE.exe --removeLegacyFakeWarning "$@" $FSIARGS build.fsx

dotnet tool restore
dotnet paket restore
dotnet run --project build "$@"
Loading
Loading