From 25b0a5f00c5ac85e9ab2982eb32f9794be636c76 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Sun, 4 Mar 2018 23:42:14 +0200 Subject: [PATCH 1/2] This is the wrong namespace to use --- Caboodle/Types/LocationExtensions.shared.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Caboodle/Types/LocationExtensions.shared.cs b/Caboodle/Types/LocationExtensions.shared.cs index c448af3..6bc89e5 100644 --- a/Caboodle/Types/LocationExtensions.shared.cs +++ b/Caboodle/Types/LocationExtensions.shared.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace Microsoft.Caboodle.Types +namespace Microsoft.Caboodle { public static partial class LocationExtensions { From 770394c43acd9f43464defb9294f661c61459cda Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Sun, 4 Mar 2018 23:42:40 +0200 Subject: [PATCH 2/2] Add the CI build script to to the project so that other bots can use it --- build.ps1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..d15cba9 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,29 @@ +$ErrorActionPreference = "Stop" + +# Find MSBuild on this machine +if ($IsMacOS) { + $msbuild = "msbuild" +} else { + $vswhere = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' + $msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath + $msbuild = join-path $msbuild 'MSBuild\15.0\Bin\MSBuild.exe' +} + +Write-Output "Using MSBuild from: $msbuild" + +# Build the projects +& $msbuild "./Caboodle.sln" /t:"Restore;Build" /p:Configuration=Release +if ($lastexitcode -ne 0) { exit $lastexitcode; } + +# Create the stable NuGet package +& $msbuild "./Caboodle/Caboodle.csproj" /t:Pack /p:Configuration=Release /p:VersionSuffix=".$env:BUILD_NUMBER" +if ($lastexitcode -ne 0) { exit $lastexitcode; } + +# Create the beta NuGet package +& $msbuild "./Caboodle/Caboodle.csproj" /t:Pack /p:Configuration=Release /p:VersionSuffix=".$env:BUILD_NUMBER-beta" +if ($lastexitcode -ne 0) { exit $lastexitcode; } + +# Copy everything into the output folder +Copy-Item "./Caboodle/bin/Release" "./Output" -Recurse -Force + +exit $lastexitcode;