Skip to content

Commit

Permalink
remove ci_build.cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
analogrelay committed Feb 16, 2016
1 parent 8fedd2a commit 57ce370
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 34 deletions.
27 changes: 27 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
10 changes: 7 additions & 3 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -57,4 +61,4 @@ def static getBuildJobName(def configuration, def os) {
}
}
}
}
}
30 changes: 0 additions & 30 deletions scripts/ci_build.cmd

This file was deleted.

13 changes: 12 additions & 1 deletion scripts/run-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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($_)) {
Expand Down Expand Up @@ -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" }

0 comments on commit 57ce370

Please sign in to comment.