From e41aa81243b02baeec4b306c6521378a90bf4e09 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Dec 2017 11:56:25 +0000 Subject: [PATCH 1/8] return -1 as exit code if msi cannot build to make appveyor build red and introduce syntax error to test it. --- assets/Product.wxs | 2 +- build.psm1 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index ed98172a4a0..d8e66a433f5 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -123,7 +123,7 @@ - + diff --git a/build.psm1 b/build.psm1 index 0fed7d091dd..7ebccc1e4a2 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2179,6 +2179,7 @@ function New-MSIPackage $WiXHeatLog | Out-String | Write-Verbose -Verbose $WiXCandleLog | Out-String | Write-Verbose -Verbose $WiXLightLog | Out-String | Write-Verbose -Verbose + $host.SetShouldExit(-1) throw "Failed to create $msiLocationPath" } } From a6b6352db2a4c92aa6fc684bddf956345a77cc63 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Dec 2017 12:48:58 +0000 Subject: [PATCH 2/8] revert deliberate syntax error since it proved that the build would go red now. --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index d8e66a433f5..ed98172a4a0 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -123,7 +123,7 @@ - + From b93530f0a885aa73aea5676282d42ac923af0f15 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Dec 2017 19:30:08 +0100 Subject: [PATCH 3/8] Exit shell due to WiX build failure only in appveyor. https://www.appveyor.com/docs/environment-variables/ --- build.psm1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 7ebccc1e4a2..7cbb819a11c 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2179,7 +2179,10 @@ function New-MSIPackage $WiXHeatLog | Out-String | Write-Verbose -Verbose $WiXCandleLog | Out-String | Write-Verbose -Verbose $WiXLightLog | Out-String | Write-Verbose -Verbose - $host.SetShouldExit(-1) + if ($null -ne $env:CI) + { + $host.SetShouldExit(-1) + } throw "Failed to create $msiLocationPath" } } From 1fc60152e61cffaf556c546ea071c84e38bdd413 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Dec 2017 19:54:27 +0100 Subject: [PATCH 4/8] Deliberately break installer build to prove ci check works --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index ed98172a4a0..47bedfedd33 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -124,7 +124,7 @@ - + From 5491c00af92fc373b620c634eb6c18bb877ed2ae Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Dec 2017 20:13:21 +0100 Subject: [PATCH 5/8] Revert deliberately broken syntax now since it has proven that the build would get red --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index 47bedfedd33..ed98172a4a0 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -124,7 +124,7 @@ - + From 510ed88823523ecc9d792403dc1352c9e93f1df0 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Jan 2018 22:21:13 +0000 Subject: [PATCH 6/8] use Add-AppveyorCompilationMessage instead of exiting host to fail in Appveyor environment as suggested in PR --- build.psm1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 7cbb819a11c..fc9d7a3fca8 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2179,11 +2179,12 @@ function New-MSIPackage $WiXHeatLog | Out-String | Write-Verbose -Verbose $WiXCandleLog | Out-String | Write-Verbose -Verbose $WiXLightLog | Out-String | Write-Verbose -Verbose + $errorMessage = "Failed to create $msiLocationPath" if ($null -ne $env:CI) { - $host.SetShouldExit(-1) + Add-AppveyorCompilationMessage $errorMessage -Category Error -FileName $MyInvocation.ScriptName -Line $MyInvocation.ScriptLineNumber } - throw "Failed to create $msiLocationPath" + throw $errorMessage } } From b5359a5e5efe9d3434b8678df5ae0eafab4cd535 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Jan 2018 22:22:38 +0000 Subject: [PATCH 7/8] Introduce Wix syntax error to test if appveyor becomes red --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index ed98172a4a0..47bedfedd33 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -124,7 +124,7 @@ - + From c2cb0dc5f7c87d7fede113e3725a3051a7aa7ac6 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Jan 2018 22:23:27 +0000 Subject: [PATCH 8/8] Revert deliverate syntax error that was temporarily introduced only for testing purposes --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index 47bedfedd33..ed98172a4a0 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -124,7 +124,7 @@ - +