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

Copy files in separate step. #64

Merged
merged 2 commits into from
May 12, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 15 additions & 16 deletions pipelines/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$publishNugets = $false
$updateAssemblyInfo = $false
$gitVersion
$msbuild = '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"'
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"
$dotnet = "C:\Program Files\dotnet\dotnet.exe"
$devenv = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.com"
$testTargetAmsId = ([System.Environment]::GetEnvironmentVariable('Tc3Target'))
Expand Down Expand Up @@ -58,21 +58,17 @@ task NugetRestore -depends Clean {
exec{
& $dotnet restore TcOpen.build.slnf
}

try {
# Try to Restore IVC into _Vortex directory
# May fail due to missing g.cs files
$command = $msbuild + " -v:$msbuildVerbosity /consoleloggerparameters:ErrorsOnly src\TcoCore\TcoCore.slnf"
Write-Host $command
cmd /c $command
}
catch {
# Swallow
}

}

task GitVersion -depends NugetRestore {
task CopyInxton -depends NugetRestore -continueOnError {
exec {
& $dotnet build `
.\src\TcoApplicationExamples\PlcAppExamplesConnector\PlcAppExamplesConnector.csproj `
/p:SolutionDir=$solutionDir
}
}

task GitVersion -depends CopyInxton {
EnsureGitVersion -pathToGitVersion ".\_toolz\gitversion.exe"
$updateAssemblyInfoFlag = if( $updateAssemblyInfo) {"/updateassemblyinfo"} else {""}
$script:gitVersion = & ".\_toolz\gitversion.exe" "$updateAssemblyInfoFlag" "/nofetch" "/config" "$baseDir/GitVersion.yml" | ConvertFrom-Json
Expand Down Expand Up @@ -134,10 +130,13 @@ task BuildWithInxtonBuilder -depends OpenVisualStudio {

task Build -depends BuildWithInxtonBuilder {
#/consoleloggerparameters:ErrorsOnly
$command = $msbuild + " /p:Configuration=$buildConfig -noWarn:CS1591;CS0067;CS0108;CS1570 /consoleloggerparameters:ErrorsOnly -v:$msbuildVerbosity .\TcOpen.build.slnf"
Write-Host $command
exec{
cmd /c $command
& $msbuild .\TcOpen.build.slnf `
/p:Configuration=$buildConfig `
-noWarn:CS1591;CS0067;CS0108;CS1570 `
/consoleloggerparameters:ErrorsOnly `
-v:$msbuildVerbosity
}
}

Expand Down
1 change: 1 addition & 0 deletions pipelines/psake.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function Exec
do {
try {
$global:lastexitcode = 0
Write-Host ($ExecutionContext.InvokeCommand.ExpandString($cmd).Trim())
& $cmd
if ($lastexitcode -ne 0) {
throw ("Exec: " + $errorMessage)
Expand Down
2 changes: 1 addition & 1 deletion pipelines/runbuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $path = Split-Path -Path $MyInvocation.MyCommand.Path

write-host "Importing psake"
Import-Module ($path + '\psake.psm1')
Import-Module ($path + '\tcobuildutils.psm1')
Import-Module ($path + '\tcobuildutils.psm1') -Force
Try
{
write-host "Starting build.ps1"
Expand Down