2016-02-05 03:44:50 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-08-31 21:33:41 +03:00
|
|
|
#
|
|
|
|
# Copyright (c) Microsoft. All rights reserved.
|
|
|
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
#
|
|
|
|
|
2016-02-05 03:44:50 +03:00
|
|
|
export FWDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
export XBUILDOPT=/verbosity:minimal
|
|
|
|
|
2016-05-10 21:27:20 +03:00
|
|
|
if [ -z $builduri ];
|
2016-02-05 03:44:50 +03:00
|
|
|
then
|
|
|
|
export builduri=build.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
export PROJ_NAME=Examples
|
|
|
|
export PROJ="$FWDIR/$PROJ_NAME.sln"
|
|
|
|
|
|
|
|
echo "===== Building $PROJ ====="
|
|
|
|
|
|
|
|
function error_exit() {
|
2016-05-10 21:27:20 +03:00
|
|
|
if [ -z $STEP ];
|
2016-02-05 03:44:50 +03:00
|
|
|
then
|
|
|
|
export STEP=$CONFIGURATION
|
|
|
|
fi
|
|
|
|
echo "===== Build FAILED for $PROJ -- $STEP with error $RC - CANNOT CONTINUE ====="
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Restore NuGet packages ==================="
|
|
|
|
export STEP=NuGet-Restore
|
|
|
|
|
|
|
|
nuget restore
|
|
|
|
|
|
|
|
export RC=$? && [ $RC -ne 0 ] && error_exit
|
|
|
|
|
|
|
|
echo "Build Debug =============================="
|
|
|
|
export STEP=Debug
|
|
|
|
|
|
|
|
export CONFIGURATION=$STEP
|
|
|
|
|
|
|
|
export STEP=$CONFIGURATION
|
|
|
|
|
|
|
|
xbuild /p:Configuration=$CONFIGURATION $XBUILDOPT $PROJ
|
|
|
|
export RC=$? && [ $RC -ne 0 ] && error_exit
|
|
|
|
echo "BUILD ok for $CONFIGURATION $PROJ"
|
|
|
|
|
|
|
|
echo "Build Release ============================"
|
|
|
|
export STEP=Release
|
|
|
|
|
|
|
|
export CONFIGURATION=$STEP
|
|
|
|
|
|
|
|
xbuild /p:Configuration=$CONFIGURATION $XBUILDOPT $PROJ
|
|
|
|
export RC=$? && [ $RC -ne 0 ] && error_exit
|
|
|
|
echo "BUILD ok for $CONFIGURATION $PROJ"
|
|
|
|
|
|
|
|
echo "===== Build succeeded for $PROJ ====="
|