forked from dotnet/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3604112
commit 9bdfb5a
Showing
7 changed files
with
151 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
@echo off | ||
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0eng\common\build.ps1""" -build -restore %*" | ||
exit /b %ErrorLevel% | ||
|
||
REM Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
REM Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,54 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
# Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
# | ||
|
||
# Set OFFLINE environment variable to build offline | ||
|
||
set -e | ||
|
||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in | ||
if [ -z "$HOME" ]; then | ||
export HOME=$DIR/artifacts/home | ||
|
||
[ ! -d "$HOME" ] || rm -Rf $HOME | ||
mkdir -p $HOME | ||
fi | ||
|
||
args= | ||
|
||
while [[ $# > 0 ]]; do | ||
lowerI="$(echo $1 | awk '{print tolower($0)}')" | ||
case $lowerI in | ||
--docker) | ||
export BUILD_IN_DOCKER=1 | ||
export DOCKER_IMAGENAME=$2 | ||
shift | ||
;; | ||
*) | ||
args="$args $1" | ||
;; | ||
esac | ||
shift | ||
done | ||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
. "$ScriptRoot/eng/common/build.sh" --build --restore "$@" | ||
dockerbuild() | ||
{ | ||
BUILD_COMMAND=/opt/code/run-build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@" | ||
} | ||
|
||
# Check if we need to build in docker | ||
if [ ! -z "$BUILD_IN_DOCKER" ]; then | ||
dockerbuild $args | ||
else | ||
$DIR/run-build.sh $args | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.