From 4fef82d8fe1dcbfa21fce89a65e0880be45c0280 Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Tue, 23 Mar 2021 12:01:35 +0100 Subject: [PATCH] (build) Update bootstrappers to latest version --- build.ps1 | 26 +++++++++++--------------- build.sh | 10 +++++++++- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/build.ps1 b/build.ps1 index 9084137..210aea2 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,20 +1,16 @@ -$ErrorActionPreference = 'Stop' +$ErrorActionPreference = 'Stop' -function Run([string[]]$arguments) { - $proc = Start-Process "dotnet" $arguments -PassThru -NoNewWindow - Wait-Process -InputObject $proc +Set-Location -LiteralPath $PSScriptRoot - if ($proc.ExitCode -ne 0) { - "Non-Zero exit code ($($proc.ExitCode)), exiting..." - exit $proc.ExitCode - } -} +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' +$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1' +$env:DOTNET_NOLOGO = '1' -Run tool, restore +dotnet tool restore +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -Run cake, recipe.cake, --bootstrap +dotnet cake recipe.cake --bootstrap +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -$arguments = @("cake"; "recipe.cake") -$arguments += @($args) - -Run $arguments +dotnet cake recipe.cake @args +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/build.sh b/build.sh index 2840db7..034798e 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,12 @@ -#!/bin/bash +#!/usr/bin/env bash +set -euox pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")" + +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_NOLOGO=1 + dotnet tool restore dotnet cake recipe.cake --bootstrap