-
Notifications
You must be signed in to change notification settings - Fork 165
/
build.ps1
33 lines (28 loc) · 1.47 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# restore and builds all projects as release.
# creates NuGet package at \artifacts
dotnet --version
$versionPrefix = "5.3.15" # Also update version for minor versions in appveyor.yml
$versionSuffix = ""
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$versionPrefix = $versionFile
$versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}
msbuild NLog.Web.sln /t:restore,rebuild /p:configuration=release /p:ContinuousIntegrationBuild=true /verbosity:minimal
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}
msbuild src\NLog.Web /t:rebuild,pack /p:configuration=release /verbosity:minimal /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}
msbuild src\NLog.Web.AspNetCore /t:rebuild,pack /p:configuration=release /verbosity:minimal /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}
dotnet list ./src/NLog.Web.AspNetCore package --vulnerable --include-transitive | findstr /S /c:"has the following vulnerable packages"
if (-Not $LastExitCode -eq 1)
{
dotnet list ./src/NLog.Web.AspNetCore package --vulnerable --include-transitive
exit 1
}