dotnet-installer/build_projects/update-dependencies/update-dependencies.sh
Livar Cunha e2b679c4bb Merge branch 'master' of /Users/livarcocc/Documents/git/cli into merge_master_cli
* 'master' of /Users/livarcocc/Documents/git/cli: (1063 commits)
  Updating signing project to use new intermediate directory (int).
  Update runtimeconfig.json doc for 2.1 (#9382)
  Shortening the path to the intermediate folder by renaming it to int.
  fix typo (#9364)
  Updating asp.net to 2.2.0 as well.
  Updating the build and tests to work with the 2.2.0 runtime.
  Simplified combining dictionaries in Telemetry
  Fixing 'Channel' and 'BranchName': "release/2.1.4xx" to "master" (#9362)
  Fix extraction of folders (#9335)
  Update Sha256Hasher.cs
  Fix relative path tool path (#9330)
  Insert updated SDK from 2.1.4xx branch
  MSBuild 15.8.60
  Fix crash when user home directory cannot be determined.
  Make `CliFolderPathCalculator` a static class.
  Don't add the ReleaseSuffix to the branding on the CLI when DropSuffix is set to true.
  Add retry when Directory.Move (#9313)
  Override new SdkResult public properties
  Add reference to Microsoft.Build.NuGetSdkResolver
  Disable crossgen for MSBuild inline-task refs
  ...
2018-06-25 22:38:01 -07:00

58 lines
1.7 KiB
Bash
Executable file

#!/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 -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$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 )"
REPO_ROOT="$DIR/../.."
PROJECT_PATH="$DIR/update-dependencies.csproj"
# 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=$REPO_ROOT/artifacts/home
[ ! -d "$HOME" ] || rm -Rf "$HOME"
mkdir -p "$HOME"
fi
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot)
if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then
export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64
fi
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Install a stage 0
echo "Installing .NET Core CLI Stage 0"
if [ -z "$DOTNET_TOOL_DIR" ]; then
$REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64
if [ $? -ne 0 ]; then
echo "Failed to install stage 0"
exit 1
fi
else
cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/
fi
# Put the stage 0 on the path
export PATH=$DOTNET_INSTALL_DIR:$PATH
echo "Invoking App $PROJECT_PATH..."
dotnet run -p "$PROJECT_PATH" $@
if [ $? -ne 0 ]; then
echo "Build failed"
exit 1
fi