Skip to content

Commit 1cce6bf

Browse files
committed
Improve build script robustness.
Add error check as long as possible. Note that install script does not have error check because it cannot stop build process even if it returns non-zero exit code.
1 parent 00ce259 commit 1cce6bf

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

appveyor-debug.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ build_script:
2525
2626
./Build.ps1
2727
28+
if ( $LastExitCode -ne 0 )
29+
{
30+
Write-Error "Failed to build."
31+
exit 1
32+
}
33+
2834
cd ..
2935
test_script:
3036
- cmd: >-
3137
cd ./build
3238
3339
./RunUnitTests.cmd
34-
35-
cd ..

appveyor-release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,36 @@ build_script:
2828
2929
./Build.ps1
3030
31+
if ( $LastExitCode -ne 0 )
32+
{
33+
Write-Error "Failed to build."
34+
exit 1
35+
}
36+
3137
appveyor PushArtifact "../dist/MsgPack.Cli.${env:PackageVersion}.nupkg"
3238
39+
if ( $LastExitCode -ne 0 )
40+
{
41+
Write-Error "Failed to publish nupkg."
42+
exit 1
43+
}
44+
3345
appveyor PushArtifact "../dist/MsgPack.Cli.${env:PackageVersion}.symbols.nupkg"
3446
47+
if ( $LastExitCode -ne 0 )
48+
{
49+
Write-Error "Failed to publish symbol nupkg."
50+
exit 1
51+
}
52+
3553
appveyor PushArtifact "../dist/MsgPack.Cli.${env:PackageVersion}.zip"
3654
55+
if ( $LastExitCode -ne 0 )
56+
{
57+
Write-Error "Failed to publish zip."
58+
exit 1
59+
}
60+
3761
cd ..
3862
deploy:
3963
- provider: Environment

0 commit comments

Comments
 (0)