remove ci_build.cmd

This commit is contained in:
Andrew Stanton-Nurse 2016-02-16 12:04:13 -08:00
parent 8fedd2ada3
commit 57ce370b51
4 changed files with 46 additions and 34 deletions

View file

@ -16,6 +16,33 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-c|--configuration)
export CONFIGURATION=$2
shift
;;
--nopackage)
export DOTNET_BUILD_SKIP_PACKAGING=1
;;
--docker)
export BUILD_IN_DOCKER=1
export DOCKER_IMAGENAME=$2
shift
;;
"--buildindocker-centos")
export BUILD_IN_DOCKER=1
export DOCKER_IMAGENAME=centos
;;
*)
break
;;
esac
shift
done
# Check if we need to build in docker
if [ ! -z "$BUILD_IN_DOCKER" ]; then
$DIR/scripts/dockerbuild.sh "$@"

View file

@ -26,10 +26,14 @@ def static getBuildJobName(def configuration, def os) {
// Calculate the build command
if (os == 'Windows_NT') {
buildCommand = ".\\scripts\\ci_build.cmd ${lowerConfiguration}"
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} Default"
}
else if (os == 'Ubuntu') {
buildCommand = "./build.sh --configuration ${lowerConfiguration} --docker ubuntu Default"
}
else {
buildCommand = "./scripts/ci_build.sh ${lowerConfiguration}"
// Jenkins non-Ubuntu CI machines don't have docker
buildCommand = "./build.sh --configuration ${lowerConfiguration} Default"
}
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {

View file

@ -1,30 +0,0 @@
@echo off
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.
set CI_BUILD=1
set VERBOSE=1
REM Shift breaks %~dp0 so capture it first
set MY_DIR=%~dp0
REM Parse arguments
:loop
IF NOT "%1"=="" (
IF "%1"=="-NoPackage" (
SET DOTNET_BUILD_SKIP_PACKAGING=1
) ELSE IF "%CONFIGURATION%"=="" (
SET CONFIGURATION=%1
) ELSE IF "%TARGETS%"=="" (
SET TARGETS=%1
) ELSE (
SET TARGETS=%TARGETS% %1
)
SHIFT
GOTO :loop
)
CALL %MY_DIR%..\build.cmd %TARGETS%
exit /b %errorlevel%

View file

@ -4,10 +4,20 @@
#
param(
[string]$Configuration="Debug")
[string]$Configuration="Debug",
[switch]$NoPackage)
$env:CONFIGURATION = $Configuration;
if($NoPackage)
{
$env:DOTNET_BUILD_SKIP_PACKAGING=1
}
else
{
$env:DOTNET_BUILD_SKIP_PACKAGING=0
}
# Load Branch Info
cat "$PSScriptRoot\..\branchinfo.txt" | ForEach-Object {
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
@ -50,6 +60,7 @@ if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
# Run the builder
Write-Host "Invoking Build Scripts..."
Write-Host " Configuration: $env:CONFIGURATION"
$env:DOTNET_HOME="$env:DOTNET_INSTALL_DIR\cli"
& "$PSScriptRoot\dotnet-cli-build\bin\dotnet-cli-build.exe" @args
if($LASTEXITCODE -ne 0) { throw "Build failed" }