Skip to content

Commit

Permalink
(build) Update bootstrappers to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Mar 23, 2021
1 parent c543e83 commit 4fef82d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
26 changes: 11 additions & 15 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -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 }
10 changes: 9 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4fef82d

Please sign in to comment.