From 4c4a074f79722e3c82d7525f65c880d07d11d3c9 Mon Sep 17 00:00:00 2001 From: Dan Travison Date: Wed, 7 Mar 2018 11:50:53 -0800 Subject: [PATCH 1/2] [FEATURE] Fix https://github.com/PowerShell/PowerShell/issues/6332 Change log and logerror functions to Write-Log [$message] [-error] --- build.psm1 | 123 ++++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 57 deletions(-) diff --git a/build.psm1 b/build.psm1 index f690b9ca15d..94c4d0f9617 100644 --- a/build.psm1 +++ b/build.psm1 @@ -228,7 +228,7 @@ function Start-BuildNativeWindowsBinaries { throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed." } - log "Start building native Windows binaries" + Write-Log "Start building native Windows binaries" if ($Clean) { git clean -fdx @@ -263,7 +263,7 @@ function Start-BuildNativeWindowsBinaries { $command = @" cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" mc.exe -o -d -c -U "$($_.FullName)" -h "$currentLocation\$nativeResourcesFolder" -r "$currentLocation\$nativeResourcesFolder" "@ - log " Executing mc.exe Command: $command" + Write-Log " Executing mc.exe Command: $command" Start-NativeExecution { Invoke-Expression -Command:$command } } } @@ -276,7 +276,7 @@ cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" mc.exe - $command = @" cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakePath" "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$cmakeArch -G "$cmakeGenerator" $cmakeGeneratorPlatform "$currentLocation" "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" "@ - log " Executing Build Command: $command" + Write-Log " Executing Build Command: $command" Start-NativeExecution { Invoke-Expression -Command:$command } # Copy the binaries from the local build directory to the packaging directory @@ -285,7 +285,7 @@ cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakeP $FilesToCopy | ForEach-Object { $srcPath = [IO.Path]::Combine((Get-Location), "bin", $Configuration, "CoreClr/$_") - log " Copying $srcPath to $dstPath" + Write-Log " Copying $srcPath to $dstPath" Copy-Item $srcPath $dstPath } @@ -300,7 +300,7 @@ cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakeP $command = @" cmd.exe /C cd /d "$location" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakePath" "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$cmakeArch -G "$cmakeGenerator" $cmakeGeneratorPlatform "$location" "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" "@ - log " Executing Build Command for PowerShell.Core.Instrumentation: $command" + Write-Log " Executing Build Command for PowerShell.Core.Instrumentation: $command" Start-NativeExecution { Invoke-Expression -Command:$command } # Copy the binary to the packaging directory @@ -354,7 +354,7 @@ function Start-BuildNativeUnixBinaries { $Native = "$PSScriptRoot/src/libpsl-native" $Lib = "$PSScriptRoot/src/powershell-unix/libpsl-native.$Ext" - log "Start building $Lib" + Write-Log "Start building $Lib" git clean -qfdX $Native @@ -439,7 +439,7 @@ function Start-PSBuild { } if ($Clean) { - log "Cleaning your working directory. You can also do it with 'git clean -fdX'" + Write-Log "Cleaning your working directory. You can also do it with 'git clean -fdX'" Push-Location $PSScriptRoot try { git clean -fdX @@ -537,7 +537,7 @@ Fix steps: } ($srcProjectDirs + $testProjectDirs) | ForEach-Object { - log "Run dotnet restore $_ $RestoreArguments" + Write-Log "Run dotnet restore $_ $RestoreArguments" Start-NativeExecution { dotnet restore $_ $RestoreArguments } } } @@ -545,7 +545,7 @@ Fix steps: # handle ResGen # Heuristic to run ResGen on the fresh machine if ($ResGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost/gen")) { - log "Run ResGen (generating C# bindings for resx files)" + Write-Log "Run ResGen (generating C# bindings for resx files)" Start-ResGen } @@ -553,7 +553,7 @@ Fix steps: # .inc file name must be different for Windows and Linux to allow build on Windows and WSL. $incFileName = "powershell_$($Options.Runtime).inc" if ($TypeGen -or -not (Test-Path "$PSScriptRoot/src/TypeCatalogGen/$incFileName")) { - log "Run TypeGen (generating CorePsTypeCatalog.cs)" + Write-Log "Run TypeGen (generating CorePsTypeCatalog.cs)" Start-TypeGen -IncFileName $incFileName } @@ -562,14 +562,14 @@ Fix steps: try { # Relative paths do not work well if cwd is not changed to project Push-Location $Options.Top - log "Run dotnet $Arguments from $pwd" + Write-Log "Run dotnet $Arguments from $pwd" Start-NativeExecution { dotnet $Arguments } if ($CrossGen) { Start-CrossGen -PublishPath $publishPath -Runtime $script:Options.Runtime - log "pwsh.exe with ngen binaries is available at: $($Options.Output)" + Write-Log "pwsh.exe with ngen binaries is available at: $($Options.Output)" } else { - log "PowerShell output: $($Options.Output)" + Write-Log "PowerShell output: $($Options.Output)" } } finally { Pop-Location @@ -652,7 +652,7 @@ function Restore-PSModuleToBuild $CI ) - log "Restore PowerShell modules to $publishPath" + Write-Log "Restore PowerShell modules to $publishPath" $modulesDir = Join-Path -Path $publishPath -ChildPath "Modules" @@ -1267,12 +1267,12 @@ function Show-PSPesterError throw 'Unknown Show-PSPester parameter set' } - logerror ("Description: " + $description) - logerror ("Name: " + $name) - logerror "message:" - logerror $message - logerror "stack-trace:" - logerror $stackTrace + Write-Log -Error ("Description: " + $description) + Write-Log -Error ("Name: " + $name) + Write-Log -Error "message:" + Write-Log -Error $message + Write-Log -Error "stack-trace:" + Write-Log -Error $stackTrace } @@ -1312,12 +1312,12 @@ function Test-XUnitTestResults $message = $failure.test.failure.message.'#cdata-section' $stackTrace = $failure.test.failure.'stack-trace'.'#cdata-section' - logerror ("Description: " + $description) - logerror ("Name: " + $name) - logerror "message:" - logerror $message - logerror "stack-trace:" - logerror $stackTrace + Write-Log -Error ("Description: " + $description) + Write-Log -Error ("Name: " + $name) + Write-Log -Error "message:" + Write-Log -Error $message + Write-Log -Error "stack-trace:" + Write-Log -Error $stackTrace } throw "$($failedTests.failed) tests failed" @@ -1348,7 +1348,7 @@ function Test-PSPesterResults $x = [xml](Get-Content -raw $testResultsFile) if ([int]$x.'test-results'.failures -gt 0) { - logerror "TEST FAILURES" + Write-Log -Error "TEST FAILURES" # switch between methods, SelectNode is not available on dotnet core if ( "System.Xml.XmlDocumentXPathExtensions" -as [Type] ) { @@ -1373,7 +1373,7 @@ function Test-PSPesterResults } elseif ($ResultObject.FailedCount -gt 0) { - logerror 'TEST FAILURES' + Write-Log -Error 'TEST FAILURES' $ResultObject.TestResult | Where-Object {$_.Passed -eq $false} | ForEach-Object { Show-PSPesterError -testFailureObject $_ @@ -1531,7 +1531,7 @@ function Start-PSBootstrap { [switch]$Force ) - log "Installing PowerShell build dependencies" + Write-Log "Installing PowerShell build dependencies" Push-Location $PSScriptRoot/tools @@ -1664,20 +1664,20 @@ function Start-PSBootstrap { if(!$dotNetExists -or $dotNetVersion -ne $dotnetCLIRequiredVersion -or $Force.IsPresent) { if($Force.IsPresent) { - log "Installing dotnet due to -Force." + Write-Log "Installing dotnet due to -Force." } elseif(!$dotNetExistis) { - log "dotnet not present. Installing dotnet." + Write-Log "dotnet not present. Installing dotnet." } else { - log "dotnet out of date ($dotNetVersion). Updating dotnet." + Write-Log "dotnet out of date ($dotNetVersion). Updating dotnet." } $DotnetArguments = @{ Channel=$Channel; Version=$Version; NoSudo=$NoSudo } Install-Dotnet @DotnetArguments } else { - log "dotnet is already installed. Skipping installation." + Write-Log "dotnet is already installed. Skipping installation." } # Install Windows dependencies if `-Package` or `-BuildWindowsNative` is specified @@ -1685,7 +1685,7 @@ function Start-PSBootstrap { ## The VSCode build task requires 'pwsh.exe' to be found in Path if (-not (Get-Command -Name pwsh.exe -CommandType Application -ErrorAction SilentlyContinue)) { - log "pwsh.exe not found. Install latest PowerShell Core release and add it to Path" + Write-Log "pwsh.exe not found. Install latest PowerShell Core release and add it to Path" $psInstallFile = [System.IO.Path]::Combine($PSScriptRoot, "tools", "install-powershell.ps1") & $psInstallFile -AddToPath } @@ -1693,7 +1693,7 @@ function Start-PSBootstrap { ## need RCEdit to modify the binaries embedded resources if (-not (Test-Path "~/.rcedit/rcedit-x64.exe")) { - log "Install RCEdit for modifying exe resources" + Write-Log "Install RCEdit for modifying exe resources" $rceditUrl = "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x64.exe" New-Item -Path "~/.rcedit" -Type Directory -Force > $null @@ -1704,7 +1704,7 @@ function Start-PSBootstrap { } if ($BuildWindowsNative) { - log "Install Windows dependencies for building PSRP plugin" + Write-Log "Install Windows dependencies for building PSRP plugin" $machinePath = [Environment]::GetEnvironmentVariable('Path', 'MACHINE') $newMachineEnvironmentPath = $machinePath @@ -1716,40 +1716,40 @@ function Start-PSBootstrap { $chocolateyPath = "$env:AllUsersProfile\chocolatey\bin" if(precheck 'choco' $null) { - log "Chocolatey is already installed. Skipping installation." + Write-Log "Chocolatey is already installed. Skipping installation." } elseif(($cmakePresent -eq $false) -or ($sdkPresent -eq $false)) { - log "Chocolatey not present. Installing chocolatey." + Write-Log "Chocolatey not present. Installing chocolatey." if ($Force -or $PSCmdlet.ShouldProcess("Install chocolatey via https://chocolatey.org/install.ps1")) { Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) if (-not ($machinePath.ToLower().Contains($chocolateyPath.ToLower()))) { - log "Adding $chocolateyPath to Path environment variable" + Write-Log "Adding $chocolateyPath to Path environment variable" $env:Path += ";$chocolateyPath" $newMachineEnvironmentPath += ";$chocolateyPath" } else { - log "$chocolateyPath already present in Path environment variable" + Write-Log "$chocolateyPath already present in Path environment variable" } } else { Write-Error "Chocolatey is required to install missing dependencies. Please install it from https://chocolatey.org/ manually. Alternatively, install cmake and Windows 10 SDK." return } } else { - log "Skipping installation of chocolatey, cause both cmake and Win 10 SDK are present." + Write-Log "Skipping installation of chocolatey, cause both cmake and Win 10 SDK are present." } # Install cmake $cmakePath = "${env:ProgramFiles}\CMake\bin" if($cmakePresent -and !($force.IsPresent)) { - log "Cmake is already installed. Skipping installation." + Write-Log "Cmake is already installed. Skipping installation." } else { - log "Cmake not present or -Force used. Installing cmake." + Write-Log "Cmake not present or -Force used. Installing cmake." Start-NativeExecution { choco install cmake -y --version 3.10.0 } if (-not ($machinePath.ToLower().Contains($cmakePath.ToLower()))) { - log "Adding $cmakePath to Path environment variable" + Write-Log "Adding $cmakePath to Path environment variable" $env:Path += ";$cmakePath" $newMachineEnvironmentPath = "$cmakePath;$newMachineEnvironmentPath" } else { - log "$cmakePath already present in Path environment variable" + Write-Log "$cmakePath already present in Path environment variable" } } @@ -1757,15 +1757,15 @@ function Start-PSBootstrap { $packageName = "windows-sdk-10.0" if (-not $sdkPresent) { - log "Windows 10 SDK not present. Installing $packageName." + Write-Log "Windows 10 SDK not present. Installing $packageName." Start-NativeExecution { choco install windows-sdk-10.0 -y } } else { - log "Windows 10 SDK present. Skipping installation." + Write-Log "Windows 10 SDK present. Skipping installation." } # Update path machine environment variable if ($newMachineEnvironmentPath -ne $machinePath) { - log "Updating Path machine environment variable" + Write-Log "Updating Path machine environment variable" if ($Force -or $PSCmdlet.ShouldProcess("Update Path machine environment variable to $newMachineEnvironmentPath")) { [Environment]::SetEnvironmentVariable('Path', $newMachineEnvironmentPath, 'MACHINE') } @@ -2013,18 +2013,27 @@ function script:Use-MSBuild { Set-Alias msbuild $frameworkMsBuildLocation -Scope Script } -function script:log([string]$message) { - Write-Host -Foreground Green $message - #reset colors for older package to at return to default after error message on a compilation error - [console]::ResetColor() -} +function script:Write-Log +{ + param + ( + [Parameter(Position=0, Mandatory)] + [ValidateNotNullOrEmpty()] + [string] $message, -function script:logerror([string]$message) { - Write-Host -Foreground Red $message + [switch] $error + ) + if ($error) + { + Write-Host -Foreground Red $message + } + else + { + Write-Host -Foreground Green $message + } #reset colors for older package to at return to default after error message on a compilation error [console]::ResetColor() } - function script:precheck([string]$command, [string]$missedMessage) { $c = Get-Command $command -ErrorAction SilentlyContinue if (-not $c) { @@ -2323,7 +2332,7 @@ function Copy-PSGalleryModules foreach ($m in $psGalleryProj.Project.ItemGroup.PackageReference) { $name = $m.Include $version = $m.Version - log "Name='$Name', Version='$version', Destination='$Destination'" + Write-Log "Name='$Name', Version='$version', Destination='$Destination'" # Remove the build revision from the src (nuget drops it). $srcVer = if ($version -match "(\d+.\d+.\d+).\d+") { From 6d9a249eafe9999b35301a2fac36cc56aaf90d65 Mon Sep 17 00:00:00 2001 From: Dan Travison Date: Thu, 8 Mar 2018 10:07:20 -0800 Subject: [PATCH 2/2] Update log references in calling modules/scripts --- tools/appveyor.psm1 | 2 +- tools/packaging/packaging.psm1 | 50 +++++++++++++++++----------------- tools/travis.ps1 | 10 +++---- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index b423a2a5618..e0c184ad149 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -530,7 +530,7 @@ function Invoke-AppveyorFinish if($env:NUGET_KEY -and $env:NUGET_URL -and [system.io.path]::GetExtension($_) -ieq '.nupkg') { - log "pushing $_ to $env:NUGET_URL" + Write-Log "pushing $_ to $env:NUGET_URL" Start-NativeExecution -sb {dotnet nuget push $_ --api-key $env:NUGET_KEY --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode } } diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 38df12fc567..651200e0a78 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -53,7 +53,7 @@ function Start-PSPackage { End { $IncludeSymbols = $null if ($PSBoundParameters.ContainsKey('IncludeSymbols')) { - log 'setting IncludeSymbols' + Write-Log 'setting IncludeSymbols' $IncludeSymbols = $PSBoundParameters['IncludeSymbols'] } @@ -76,7 +76,7 @@ function Start-PSPackage { } } - log "Packaging RID: '$Runtime'; Packaging Configuration: '$Configuration'" + Write-Log "Packaging RID: '$Runtime'; Packaging Configuration: '$Configuration'" $Script:Options = Get-PSOptions @@ -189,7 +189,7 @@ function Start-PSPackage { } } - log "Packaging Source: '$Source'" + Write-Log "Packaging Source: '$Source'" # Decide package output type if (-not $Type) { @@ -210,7 +210,7 @@ function Start-PSPackage { } Write-Warning "-Type was not specified, continuing with $Type!" } - log "Packaging Type: $Type" + Write-Log "Packaging Type: $Type" # Add the symbols to the suffix # if symbols are specified to be included @@ -405,7 +405,7 @@ function New-TarballPackage { } if (Test-Path -Path $packagePath) { - log "You can find the tarball package at $packagePath" + Write-Log "You can find the tarball package at $packagePath" return $packagePath } else { throw "Failed to create $packageName" @@ -447,7 +447,7 @@ function New-PSSignedBuildZip Get-ChildItem -path $signedFilesFilter -Recurse -File | Select-Object -ExpandProperty FullName | Foreach-Object -Process { $relativePath = $_.Replace($signedFilesPath,'') $destination = Join-Path -Path $buildPath -ChildPath $relativePath - log "replacing $destination with $_" + Write-Log "replacing $destination with $_" Copy-Item -Path $_ -Destination $destination -force } @@ -463,7 +463,7 @@ function New-PSSignedBuildZip if ($VstsVariableName) { # set VSTS variable with path to package files - log "Setting $VstsVariableName to $zipLocationPath" + Write-Log "Setting $VstsVariableName to $zipLocationPath" Write-Host "##vso[task.setvariable variable=$VstsVariableName]$zipLocationPath" } else @@ -792,7 +792,7 @@ function New-MacOsDistributionPackage # 2 - minimum os version $PackagingStrings.OsxDistributionTemplate -f "PowerShell - $Version", $Version, $packageName, '10.12' | Out-File -Encoding ascii -FilePath $distributionXmlPath -Force - log "Applying distribution.xml to package..." + Write-Log "Applying distribution.xml to package..." Push-Location $tempDir try { @@ -1214,7 +1214,7 @@ function New-ZipPackage if (Test-Path $zipLocationPath) { - log "You can find the Zip @ $zipLocationPath" + Write-Log "You can find the Zip @ $zipLocationPath" $zipLocationPath } else @@ -1250,7 +1250,7 @@ function CreateNugetPlatformFolder } Copy-Item -Path $fullPath -Destination $destPath - log "Copied $file to $Platform" + Write-Log "Copied $file to $Platform" } <# @@ -1376,7 +1376,7 @@ function New-UnifiedNugetPackage #region ref $refFolder = New-Item (Join-Path $filePackageFolder.FullName 'ref/netstandard2.0') -ItemType Directory -Force Copy-Item $refBinFullName -Destination $refFolder -Force - log "Copied file $refBinFullName to $refFolder" + Write-Log "Copied file $refBinFullName to $refFolder" #endregion ref $packageRuntimesFolderPath = $packageRuntimesFolder.FullName @@ -1603,7 +1603,7 @@ function New-ReferenceAssembly $smaCs = Join-Path $smaProjectFolder 'System.Management.Automation.cs' $smaCsFiltered = Join-Path $smaProjectFolder 'System.Management.Automation_Filtered.cs' - log "Working directory: $genAPIFolder." + Write-Log "Working directory: $genAPIFolder." #region GenAPI @@ -1614,7 +1614,7 @@ function New-ReferenceAssembly throw "GenAPI.exe was not found at: $GenAPIToolPath" } - log "GenAPI nuget package saved and expanded." + Write-Log "GenAPI nuget package saved and expanded." $linuxSMAPath = Join-Path $Linux64BinPath "System.Management.Automation.dll" @@ -1624,11 +1624,11 @@ function New-ReferenceAssembly } $genAPIArgs = "$linuxSMAPath","-libPath:$Linux64BinPath" - log "GenAPI cmd: $genAPIExe $genAPIArgsString" + Write-Log "GenAPI cmd: $genAPIExe $genAPIArgsString" Start-NativeExecution { & $genAPIExe $genAPIArgs } | Out-File $smaCs -Force - log "Reference assembly file generated at: $smaCs" + Write-Log "Reference assembly file generated at: $smaCs" #endregion GenAPI @@ -1674,7 +1674,7 @@ function New-ReferenceAssembly Move-Item $smaCsFiltered $smaCs -Force - log "Reference assembly code cleanup complete." + Write-Log "Reference assembly code cleanup complete." #endregion Cleanup SMA.cs @@ -1701,7 +1701,7 @@ function New-ReferenceAssembly Copy-Item $refBinPath $RefAssemblyDestinationPath -Force - log "Reference assembly built and copied to $RefAssemblyDestinationPath" + Write-Log "Reference assembly built and copied to $RefAssemblyDestinationPath" } finally { @@ -1794,7 +1794,7 @@ function Publish-NugetToMyGet } Get-ChildItem $PackagePath | ForEach-Object { - log "Pushing $_ to PowerShell Myget" + Write-Log "Pushing $_ to PowerShell Myget" Start-NativeExecution { nuget push $_.FullName -Source 'https://powershell.myget.org/F/powershell-core/api/v2/package' -ApiKey $ApiKey } > $null } } @@ -1843,9 +1843,9 @@ function New-NugetContentPackage $Force ) - log "PackageVersion: $PackageVersion" + Write-Log "PackageVersion: $PackageVersion" $nugetSemanticVersion = Get-NugetSemanticVersion -Version $PackageVersion - log "nugetSemanticVersion: $nugetSemanticVersion" + Write-Log "nugetSemanticVersion: $nugetSemanticVersion" $nugetFolder = New-SubFolder -Path $PSScriptRoot -ChildPath 'nugetOutput' -Clean @@ -1874,8 +1874,8 @@ function New-NugetContentPackage $arguments += "/p:PackageName=$nuspecPackageName" $arguments += $projectFolder - log "Running dotnet $arguments" - log "Use -verbose to see output..." + Write-Log "Running dotnet $arguments" + Write-Log "Use -verbose to see output..." Start-NativeExecution -sb {dotnet $arguments} | Foreach-Object {Write-Verbose $_} $nupkgFile = "${nugetFolder}\${nuspecPackageName}-${packageRuntime}.${nugetSemanticVersion}.nupkg" @@ -2156,14 +2156,14 @@ function New-MSIPackage Write-Error -Message "Package already exists, use -Force to overwrite, path: $msiLocationPath" -ErrorAction Stop } - log "verifying no new files have been added or removed..." + Write-Log "verifying no new files have been added or removed..." Start-NativeExecution -VerboseOutputOnError { & $wixHeatExePath dir $ProductSourcePath -dr $productDirectoryName -cg $productDirectoryName -gg -sfrag -srd -scom -sreg -out $wixFragmentPath -var env.ProductSourcePath -v} Test-FileWxs -FilesWxsPath $FilesWxsPath -HeatFilesWxsPath $wixFragmentPath - log "running candle..." + Write-Log "running candle..." Start-NativeExecution -VerboseOutputOnError { & $wixCandleExePath "$ProductWxsPath" "$FilesWxsPath" -out (Join-Path "$env:Temp" "\\") -ext WixUIExtension -ext WixUtilExtension -arch $ProductTargetArchitecture -v} - log "running light..." + Write-Log "running light..." # suppress ICE61, because we allow same version upgrades # suppress ICE57, this suppresses an error caused by our shortcut not being installed per user Start-NativeExecution -VerboseOutputOnError {& $wixLightExePath -sice:ICE61 -sice:ICE57 -out $msiLocationPath -pdbout $msiPdbLocationPath $wixObjProductPath $wixObjFragmentPath -ext WixUIExtension -ext WixUtilExtension -dWixUILicenseRtf="$LicenseFilePath"} diff --git a/tools/travis.ps1 b/tools/travis.ps1 index 50eed8130d3..ae13cd28812 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -18,7 +18,7 @@ function Send-DailyWebHook # Varible should be set in Travis-CI.org settings if ($env:WebHookUrl) { - log "Sending DailyWebHook with result '$result'." + Write-Log "Sending DailyWebHook with result '$result'." $webhook = $env:WebHookUrl $Body = @{ @@ -41,7 +41,7 @@ OS Type: $($PSVersionTable.OS)
} else { - log "Skipping DailyWebHook. WebHookUrl environment variable not present." + Write-Log "Skipping DailyWebHook. WebHookUrl environment variable not present." } } @@ -284,7 +284,7 @@ elseif($Stage -eq 'Build') # 3 - it's a nupkg file if($isDailyBuild -and $env:NUGET_KEY -and $env:NUGET_URL -and [system.io.path]::GetExtension($package) -ieq '.nupkg') { - log "pushing $package to $env:NUGET_URL" + Write-Log "pushing $package to $env:NUGET_URL" Start-NativeExecution -sb {dotnet nuget push $package --api-key $env:NUGET_KEY --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode } } @@ -317,7 +317,7 @@ elseif($Stage -in 'Failure', 'Success') write-warning "Could not retrieve $result badge" } else { - log "Setting status badge to '$result'" + Write-Log "Setting status badge to '$result'" Set-DailyBuildBadge -content $svgData } } @@ -333,7 +333,7 @@ elseif($Stage -in 'Failure', 'Success') } } else { - log 'We only send bagde or webhook update for Cron builds' + Write-Log 'We only send bagde or webhook update for Cron builds' } }