forked from dotnet/wcf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs building on non-Windows operating systems.
- Loading branch information
1 parent
72e4a35
commit eae4527
Showing
5 changed files
with
104 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
source="${BASH_SOURCE[0]}" | ||
|
||
# resolve $SOURCE until the file is no longer a symlink | ||
while [[ -h $source ]]; do | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
source="$(readlink "$source")" | ||
|
||
# if $source was a relative symlink, we need to resolve it relative to the path where the | ||
# symlink file was located | ||
[[ $source != /* ]] && source="$scriptroot/$source" | ||
done | ||
|
||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
||
"$scriptroot/eng/build.sh" $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ue | ||
|
||
source="${BASH_SOURCE[0]}" | ||
|
||
# resolve $source until the file is no longer a symlink | ||
while [[ -h "$source" ]]; do | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
source="$(readlink "$source")" | ||
# if $source was a relative symlink, we need to resolve it relative to the path where the | ||
# symlink file was located | ||
[[ $source != /* ]] && source="$scriptroot/$source" | ||
done | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
||
usage() | ||
{ | ||
echo "Common settings:" | ||
echo " --configuration <value> Build configuration: Debug or Release (short: -c)" | ||
echo " --verbosity <value> MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" | ||
echo " --binaryLog Output binary log (short: -bl)" | ||
echo " --help Print help and exit (short: -h)" | ||
echo "" | ||
|
||
echo "Actions (defaults to --restore --build):" | ||
echo " --restore Restore dependencies (short: -r)" | ||
echo " --build Build all source projects (short: -b)" | ||
echo " --rebuild Rebuild all source projects" | ||
echo " --test Run all unit tests (short: -t)" | ||
echo " --pack Package build outputs into NuGet packages" | ||
echo " --sign Sign build outputs" | ||
echo " --publish Publish artifacts (e.g. symbols)" | ||
echo " --clean Clean the solution" | ||
echo "" | ||
} | ||
|
||
arguments='' | ||
extraargs='' | ||
|
||
# Check if an action is passed in | ||
declare -a actions=("r" "restore" "b" "build" "rebuild" "t" "test" "pack" "sign" "publish" "clean") | ||
actInt=($(comm -12 <(printf '%s\n' "${actions[@]/#/-}" | sort) <(printf '%s\n' "${@/#--/-}" | sort))) | ||
|
||
while [[ $# > 0 ]]; do | ||
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" | ||
|
||
case "$opt" in | ||
-help|-h|-\?|/?) | ||
usage | ||
exit 0 | ||
;; | ||
|
||
-configuration|-c) | ||
if [ -z ${2+x} ]; then | ||
echo "No configuration supplied. See help (--help) for supported configurations." 1>&2 | ||
exit 1 | ||
fi | ||
passedConfig="$(echo "$2" | tr "[:upper:]" "[:lower:]")" | ||
case "$passedConfig" in | ||
debug|release) | ||
val="$(tr '[:lower:]' '[:upper:]' <<< ${passedConfig:0:1})${passedConfig:1}" | ||
;; | ||
*) | ||
echo "Unsupported configuration '$2'." | ||
echo "The allowed values are Debug or Release." | ||
exit 1 | ||
;; | ||
esac | ||
arguments="$arguments /p:ConfigurationGroup=$val -configuration $val" | ||
shift 2 | ||
;; | ||
|
||
*) | ||
extraargs="$extraargs $1" | ||
shift 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ ${#actInt[@]} -eq 0 ]; then | ||
arguments="-restore -build $arguments" | ||
fi | ||
|
||
arguments="$arguments $extraargs" | ||
"$scriptroot/common/build.sh" $arguments |