parent
6e3ade1672
commit
06c66638f3
7 changed files with 37 additions and 36 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -41,3 +41,6 @@ TestResults/
|
|||
|
||||
# CMake generated files
|
||||
cmake/
|
||||
|
||||
# stage0 install directory
|
||||
.dotnet_stage0
|
||||
|
|
37
build.sh
37
build.sh
|
@ -3,22 +3,6 @@
|
|||
# $1 is passed to package to enable deb or pkg packaging
|
||||
set -e
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
lowerI="$(echo $i | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
release)
|
||||
export CONFIGURATION=Release
|
||||
;;
|
||||
debug)
|
||||
export CONFIGURATION=Debug
|
||||
;;
|
||||
*)
|
||||
esac
|
||||
done
|
||||
|
||||
[ -z "$CONFIGURATION" ] && CONFIGURATION=Debug
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
@ -29,6 +13,27 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
|
||||
source "$DIR/scripts/_common.sh"
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
lowerI="$(echo $i | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
release)
|
||||
export CONFIGURATION=Release
|
||||
;;
|
||||
debug)
|
||||
export CONFIGURATION=Debug
|
||||
;;
|
||||
*)
|
||||
esac
|
||||
done
|
||||
|
||||
[ -z "$CONFIGURATION" ] && CONFIGURATION=Debug
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
export DOTNET_INSTALL_DIR=$DIR/.dotnet_stage0/$RID
|
||||
[ -d $DOTNET_INSTALL_DIR ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
export PATH=$DOTNET_INSTALL_DIR/bin:$PATH
|
||||
|
||||
# UTC Timestamp of the last commit is used as the build number. This is for easy synchronization of build number between Windows, OSX and Linux builds.
|
||||
LAST_COMMIT_TIMESTAMP=$(git log -1 --format=%ct)
|
||||
|
||||
|
|
|
@ -3,6 +3,14 @@ param(
|
|||
|
||||
$ErrorActionPreference="Stop"
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
$env:DOTNET_INSTALL_DIR="$PSScriptRoot\.dotnet_stage0\win7-x64"
|
||||
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
||||
{
|
||||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||
}
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR\cli\bin;$env:PATH"
|
||||
|
||||
if (!$env:DOTNET_BUILD_VERSION) {
|
||||
# Get the timestamp of the most recent commit
|
||||
$timestamp = git log -1 --format=%ct
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
@echo off
|
||||
|
||||
pushd %~dp0..
|
||||
set DOTNET_INSTALL_DIR=%CD%\artifacts\win7-x64\stage0
|
||||
popd
|
||||
CALL %~dp0..\build.cmd %*
|
||||
|
||||
exit /b %errorlevel%
|
||||
|
|
|
@ -14,7 +14,6 @@ source "$SCRIPT_DIR/_common.sh"
|
|||
# Tell install scripts to skip pre-req check since the CI has the pre-reqs but not ldconfig it seems
|
||||
# Also, install to a directory under the repo root since we don't have permission to work elsewhere
|
||||
export DOTNET_INSTALL_SKIP_PREREQS=1
|
||||
export DOTNET_INSTALL_DIR=$SCRIPT_DIR/../artifacts/$RID/stage0
|
||||
|
||||
# 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
|
||||
|
|
|
@ -80,13 +80,7 @@ if (Test-Path "$InstallDir\$DotNetFileName") {
|
|||
del -for "$InstallDir\$DotNetFileName"
|
||||
}
|
||||
|
||||
say "The .NET Tools have been installed to $InstallDir!"
|
||||
say "The .NET Tools have been installed to $InstallDir\cli!"
|
||||
|
||||
$binPath = "$InstallDir\bin"
|
||||
if (Test-Path $binPath) {
|
||||
# New layout
|
||||
say "Add '$InstallDir\bin' to your PATH to use dotnet"
|
||||
} else {
|
||||
# Old layout (temporary)
|
||||
say "Add '$InstallDir' to your PATH to use dotnet"
|
||||
}
|
||||
# New layout
|
||||
say "Add '$InstallDir\cli\bin' to your PATH to use dotnet"
|
||||
|
|
|
@ -37,13 +37,8 @@ MY_NAME=$(basename ${BASH_SOURCE[0]})
|
|||
MY_TARGET=$DOTNET_TOOLS/bin/$MY_NAME
|
||||
|
||||
if [ ! -e "$MY_TARGET" ]; then
|
||||
# try the old layout
|
||||
MY_TARGET=$DOTNET_TOOLS/$MY_NAME
|
||||
if [ ! -e "$MY_TARGET" ]; then
|
||||
echo "error: the tool $MY_TARGET cannot be found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "warning: this version of the dotnet tools is using the old layout!" 1>&2
|
||||
echo "error: the tool $MY_TARGET cannot be found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -x "$MY_TARGET" ]; then
|
||||
|
|
Loading…
Reference in a new issue