Fixing logic to remove already processed arguments in the case of bash scripts and adding a missing come in the case of the powershell script.

This commit is contained in:
Livar Cunha 2016-07-08 16:40:44 -07:00
parent b1ca63c7de
commit eaf9d9603d
2 changed files with 12 additions and 5 deletions

View file

@ -7,7 +7,7 @@ param(
[string]$Configuration="Debug", [string]$Configuration="Debug",
[string]$Architecture="x64", [string]$Architecture="x64",
# This is here just to eat away this parameter because CI still passes this in. # This is here just to eat away this parameter because CI still passes this in.
[string]$Targets="Default" [string]$Targets="Default",
[switch]$NoPackage, [switch]$NoPackage,
[switch]$Help, [switch]$Help,
[Parameter(Position=0, ValueFromRemainingArguments=$true)] [Parameter(Position=0, ValueFromRemainingArguments=$true)]

View file

@ -29,22 +29,29 @@ while [[ $# > 0 ]]; do
case $lowerI in case $lowerI in
-c|--configuration) -c|--configuration)
export CONFIGURATION=$2 export CONFIGURATION=$2
args=( "${args[@]/$1}" )
args=( "${args[@]/$2}" ) args=( "${args[@]/$2}" )
shift shift
;; ;;
--nopackage) --nopackage)
export DOTNET_BUILD_SKIP_PACKAGING=1 export DOTNET_BUILD_SKIP_PACKAGING=1
args=( "${args[@]/$1}" )
;; ;;
--skip-prereqs) --skip-prereqs)
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
export DOTNET_INSTALL_SKIP_PREREQS=1 export DOTNET_INSTALL_SKIP_PREREQS=1
args=( "${args[@]/$1}" )
;; ;;
--architecture) --architecture)
ARCHITECTURE=$2 ARCHITECTURE=$2
args=( "${args[@]/$1}" )
args=( "${args[@]/$2}" )
shift shift
;; ;;
--targets)
# This is here just to eat away this parameter because CI still passes this in. # This is here just to eat away this parameter because CI still passes this in.
--targets)
args=( "${args[@]/$1}" )
args=( "${args[@]/$2}" )
shift shift
;; ;;
--help) --help)
@ -63,8 +70,6 @@ while [[ $# > 0 ]]; do
;; ;;
esac esac
# removes the just processed argument from args
args=( "${args[@]/$1}" )
shift shift
done done
@ -101,4 +106,6 @@ fi
# Disable first run since we want to control all package sources # Disable first run since we want to control all package sources
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
echo "${args[@]}"
dotnet build3 build.proj /p:Architecture=$ARCHITECTURE "${args[@]}" dotnet build3 build.proj /p:Architecture=$ARCHITECTURE "${args[@]}"