Clean up build scripts

Decompose into self-contained granular components
Provide reasonable defaults for cross cutting concerns, allowing for independent execution of steps
Start unifying Windows/Bash architecture

fix Bash CI scripts

dockerbuild.sh _common.sh path

Add missing restore-packages.sh

Copy/paste issues

Quote $SOURCE
fix .gitignore

PR Feedback

Merge in @SridarMS's work to avoid redownloading DNX

enabling build of dotnet-build

merge in @SridharMS's CentOS changes

Enable building FSC

enable restoring specific subdirectories

Fix dnx version check

Add missed dependency

Fix pathing to tests

Match Linux build version to Windows, fixing linux tests as a side effect.

workaround for coreclr#2215

fix pathing issue

disable building in docker

BUILD_IN_DOCKER was set, somehow...

fix headers
This commit is contained in:
Piotr Puszkiewicz 2015-12-28 11:47:21 -08:00
parent d1a257bff7
commit 4b217db9c0
66 changed files with 1163 additions and 242 deletions

View file

@ -12,7 +12,7 @@ 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
[[ "$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 )"

View file

@ -8,7 +8,7 @@ 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
[[ "$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 )"

View file

@ -0,0 +1,25 @@
#!/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 )"
source "$DIR/../common/_common.sh"
if [[ "$OSNAME" == "ubuntu" ]]; then
# Create Debian package
$REPOROOT/scripts/package/package-debian.sh
elif [[ "$OSNAME" == "osx" ]]; then
# Create OSX PKG
$REPOROOT/packaging/osx/package-osx.sh
fi

View file

@ -3,7 +3,7 @@
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
. "$PSScriptRoot\..\_common.ps1"
. "$PSScriptRoot\..\common\_common.ps1"
if(!(Test-Path $PackageDir)) {
mkdir $PackageDir | Out-Null

View file

@ -4,38 +4,44 @@
# 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
[[ "$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 )"
source "$DIR/../common/_common.sh"
REPOROOT="$( cd -P "$DIR/../.." && pwd )"
source "$DIR/../_common.sh"
echo "Starting packaging"
if [ -z "$DOTNET_BUILD_VERSION" ]; then
TIMESTAMP=$(date "+%Y%m%d%H%M%S")
export DOTNET_BUILD_VERSION=0.0.1-alpha-t$TIMESTAMP
echo "Version: $DOTNET_BUILD_VERSION"
DOTNET_BUILD_VERSION=0.0.1-alpha-t$TIMESTAMP
fi
COMMIT=$(git rev-parse HEAD)
echo $COMMIT > $STAGE2_DIR/.version
echo $DOTNET_BUILD_VERSION >> $STAGE2_DIR/.version
STAGE2_DIR=$REPOROOT/artifacts/$RID/stage2
# Create Dnvm Package
$DIR/package-dnvm.sh
if [[ "$OSNAME" == "ubuntu" ]]; then
# Create Debian package
$DIR/package-debian.sh
elif [[ "$OSNAME" == "osx" ]]; then
# Create OSX PKG
$DIR/../../packaging/osx/package-osx.sh
if [ ! -d "$STAGE2_DIR" ]; then
error "missing stage2 output in $STAGE2_DIR" 1>&2
exit
fi
PACKAGE_DIR=$REPOROOT/artifacts/packages/dnvm
[ -d "$PACKAGE_DIR" ] || mkdir -p $PACKAGE_DIR
PACKAGE_SHORT_NAME=dotnet-${OSNAME}-x64.${DOTNET_BUILD_VERSION}
PACKAGE_NAME=$PACKAGE_DIR/${PACKAGE_SHORT_NAME}.tar.gz
cd $STAGE2_DIR
header "Packaging $PACKAGE_SHORT_NAME"
# Tar up the stage2 artifacts
# We need both "*" and ".version" to ensure we pick up that file
tar -czf $PACKAGE_NAME * .version
info "Packaged stage2 to $PACKAGE_NAME"
$DIR/../publish/publish.sh $PACKAGE_NAME