From a3498fa5a2f40afe315892836d162c3b3a67e7dd Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Mon, 4 Jan 2016 15:51:25 -0800 Subject: [PATCH] Update some files --- KoreBuild-dotnet/build/dotnet-install.ps1 | 4 ++-- KoreBuild-dotnet/build/dotnet-install.sh | 13 +++++++++---- build-template-dotnet/.travis.yml | 20 ++++++++++++++++++++ build-template-dotnet/appveyor.yml | 7 +++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 build-template-dotnet/.travis.yml create mode 100644 build-template-dotnet/appveyor.yml diff --git a/KoreBuild-dotnet/build/dotnet-install.ps1 b/KoreBuild-dotnet/build/dotnet-install.ps1 index 8c187ba5a1..a30d4ed02e 100644 --- a/KoreBuild-dotnet/build/dotnet-install.ps1 +++ b/KoreBuild-dotnet/build/dotnet-install.ps1 @@ -33,7 +33,7 @@ if (Test-Path $LocalFile) if ($LocalVersion -and $LocalHash) { $RemoteResponse = Invoke-WebRequest -UseBasicParsing "$Feed/$Channel/dnvm/latest.win.version" - $RemoteData = @([Text.Encoding]::UTF8.GetString($RemoteResponse.Content).Split()); + $RemoteData = @([Text.Encoding]::UTF8.GetString($RemoteResponse.Content).Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries)); $RemoteHash = $RemoteData[0].Trim() $RemoteVersion = $RemoteData[1].Trim() @@ -88,4 +88,4 @@ if (Test-Path "$InstallDir\$DotNetFileName") { say "The .NET Tools have been installed to $InstallDir\cli!" # New layout -say "Add '$InstallDir\cli\bin' to your PATH to use dotnet" +say "Add '$InstallDir\cli\bin' to your PATH to use dotnet" \ No newline at end of file diff --git a/KoreBuild-dotnet/build/dotnet-install.sh b/KoreBuild-dotnet/build/dotnet-install.sh index 5030b9e56d..c4dac0e6ba 100644 --- a/KoreBuild-dotnet/build/dotnet-install.sh +++ b/KoreBuild-dotnet/build/dotnet-install.sh @@ -16,7 +16,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 )" @@ -87,7 +87,12 @@ current_os() if [ "$uname" = "Darwin" ]; then echo "osx" else - echo "linux" + # Detect Distro + if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then + echo "ubuntu" + elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then + echo "centos" + fi fi } @@ -107,7 +112,7 @@ check_pre_reqs() { return 0 fi - if [ "$os" = "linux" ]; then + if [ "$(uname)" = "Linux" ]; then [ -z "$(ldconfig -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && _failing=true [ -z "$(ldconfig -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && _failing=true [ -z "$(ldconfig -p | grep libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && _failing=true @@ -259,4 +264,4 @@ do shift done -install_dotnet +install_dotnet \ No newline at end of file diff --git a/build-template-dotnet/.travis.yml b/build-template-dotnet/.travis.yml new file mode 100644 index 0000000000..bf811dc26a --- /dev/null +++ b/build-template-dotnet/.travis.yml @@ -0,0 +1,20 @@ +language: csharp +sudo: required +dist: trusty +addons: + apt: + packages: + - gettext + - libcurl4-openssl-dev + - libicu-dev + - libssl-dev + - libunwind8 + - zlib1g +mono: + - 4.0.5 +os: + - linux + - osx +osx_image: xcode7.1 +script: + - ./build.sh verify \ No newline at end of file diff --git a/build-template-dotnet/appveyor.yml b/build-template-dotnet/appveyor.yml new file mode 100644 index 0000000000..3fab83e134 --- /dev/null +++ b/build-template-dotnet/appveyor.yml @@ -0,0 +1,7 @@ +init: + - git config --global core.autocrlf true +build_script: + - build.cmd verify +clone_depth: 1 +test: off +deploy: off \ No newline at end of file