Merge pull request #58 from mattleibow/add-build
Added a build script for CI bots
This commit is contained in:
Коммит
2927301b5a
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Caboodle.Types
|
||||
namespace Microsoft.Caboodle
|
||||
{
|
||||
public static partial class LocationExtensions
|
||||
{
|
||||
|
|
|
@ -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;
|
Загрузка…
Ссылка в новой задаче