From 78c892b1bb5e7516cd7c1fba1555da633d3764e8 Mon Sep 17 00:00:00 2001 From: RogueException Date: Wed, 25 Jan 2017 16:56:23 -0400 Subject: [PATCH] Pack script fixes --- build.ps1 | 4 ++-- pack.ps1 | 2 +- test.ps1 | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 111dabbe6..b39b817cf 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,10 +1,10 @@ if (Test-Path Env:\APPVEYOR_BUILD_NUMBER) { - $build = [convert]::ToInt32($env:APPVEYOR_BUILD_NUMBER).ToString("00000") + $build = $env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0") } else { $build = "dev" } -dotnet restore Discord.Net.sln +appveyor-retry dotnet restore Discord.Net.sln -v Minimal -p:BuildNumber="$build" if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } dotnet build Discord.Net.sln -c "Release" -p:BuildNumber="$build" if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } \ No newline at end of file diff --git a/pack.ps1 b/pack.ps1 index d3d7e5679..531623a30 100644 --- a/pack.ps1 +++ b/pack.ps1 @@ -1,5 +1,5 @@ if (Test-Path Env:\APPVEYOR_BUILD_NUMBER) { - $build = [convert]::ToInt32($env:APPVEYOR_BUILD_NUMBER).ToString("00000") + $build = $env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0") } else { $build = "dev" } diff --git a/test.ps1 b/test.ps1 index dbf15abc9..98df9469d 100644 --- a/test.ps1 +++ b/test.ps1 @@ -1,2 +1,8 @@ +if (Test-Path Env:\APPVEYOR_BUILD_NUMBER) { + $build = $env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0") +} else { + $build = "dev" +} + dotnet test test/Discord.Net.Tests/Discord.Net.Tests.csproj -c "Release" --noBuild -p:BuildNumber="$build" if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } \ No newline at end of file