Improve build configuration

parent f0e65289
Pipeline #32 passed with stages
in 4 minutes and 6 seconds
stages:
- Build
- Documentation
- Package
Build Solution:
NET Framework 4.0:
stage: Build
script: "powershell .\\Build.ps1 NChronicle.Core.sln"
\ No newline at end of file
script: "msbuild NChronicle.Core_NetFx.csproj /p:Configuration=Release"
artifacts:
paths:
- bin/Release/netfx4.0/
NET Standard 1.4:
stage: Build
script: "dotnet build NChronicle.Core_NetStandard.csproj -c Release"
artifacts:
paths:
- bin/Release/netstandard1.4/
Documentation:
stage: Documentation
script: "msbuild NChronicle.Core.shfbproj /p:Configuration=Release"
dependencies:
- NET Framework 4.0
artifacts:
paths:
- _Wiki/
Package:
stage: Package
script: "nuget pack NChronicle.Core.nuspec"
dependencies:
- NET Framework 4.0
- NET Standard 1.4
artifacts:
paths:
- NChronicle.Core.*.nupkg
Param([string] $target, [string] $msbuild)
$PROGRAM_FILES_32 = ${env:ProgramFiles(x86)}
$DEFAULT_LOCATION_FOR_BUILDTOOLS = "$PROGRAM_FILES_32\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe"
$DEFAULT_LOCATION_FOR_VS_COMMUNITY = "$PROGRAM_FILES_32\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
$DEFAULT_LOCATION_FOR_VS_PROFESSIONAL = "$PROGRAM_FILES_32\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
$DEFAULT_LOCATION_FOR_VS_ENTERPRISE = "$PROGRAM_FILES_32\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
if (![String]::IsNullOrEmpty($msbuild)) {
if (-not (Test-Path $msbuild)) {
Throw [System.IO.FileNotFoundException] "The path $msbuild was invalid or the file did not exist."
}
} else {
$msbuild = $DEFAULT_LOCATION_FOR_BUILDTOOLS
if (-not (Test-Path $msbuild)) {
$msbuild = $DEFAULT_LOCATION_FOR_VS_COMMUNITY
}
if (-not (Test-Path $msbuild)) {
$msbuild = $DEFAULT_LOCATION_FOR_VS_PROFESSIONAL
}
if (-not (Test-Path $msbuild)) {
$msbuild = $DEFAULT_LOCATION_FOR_VS_ENTERPRISE
}
if (-not (Test-Path $msbuild)) {
Throw [System.IO.FileNotFoundException] "Could not find a C# 7 MSBuild tool."
}
}
&$msbuild $target
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment