Improve build configuration

parent 49d5aaf0
stages: stages:
- Build - Build
- Documentation
- Package - Package
Build Solution: NET Framework 4.0:
stage: Build stage: Build
script: "powershell .\\Build.ps1 NChronicle.Console.sln" script: "nuget restore & msbuild NChronicle.Console_NetFx.csproj /p:Configuration=Release"
\ No newline at end of file artifacts:
paths:
- bin/Release/netfx4.0/
NET Standard 1.4:
stage: Build
script: "dotnet build NChronicle.Console_NetStandard.csproj -c Release"
artifacts:
paths:
- bin/Release/netstandard1.4/
Documentation:
stage: Documentation
script: "msbuild NChronicle.Console.shfbproj /p:Configuration=Release"
dependencies:
- NET Framework 4.0
artifacts:
paths:
- _Wiki/
Package:
stage: Package
script: "nuget pack NChronicle.Console.nuspec"
dependencies:
- NET Framework 4.0
- NET Standard 1.4
artifacts:
paths:
- NChronicle.Console.*.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
...@@ -19,7 +19,6 @@ EndProject ...@@ -19,7 +19,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{0B2A6D8E-00D1-439A-AE95-83BCA4EDEC30}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{0B2A6D8E-00D1-439A-AE95-83BCA4EDEC30}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.gitlab-ci.yml = .gitlab-ci.yml .gitlab-ci.yml = .gitlab-ci.yml
Build.ps1 = Build.ps1
BuildFormattedWiki.ps1 = BuildFormattedWiki.ps1 BuildFormattedWiki.ps1 = BuildFormattedWiki.ps1
EndProjectSection EndProjectSection
EndProject EndProject
......
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