-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
147 changed files
with
7,852 additions
and
475 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,48 @@ | ||
#!/usr/bin/env bash | ||
# Script arguments: | ||
# $1: Project/Solution to build | ||
# $2: Target(Normally should be Debug or Release) | ||
# $3: Platform(Normally should be "Any CPU" for sln and AnyCPU for a csproj) | ||
# $4: Framework (Optional, but can specified to only build for one, ex: net472 or net5.0) | ||
# if none are passed, defaults to building Sharpmake.sln in Debug|Any CPU for all frameworks | ||
|
||
function BuildSharpmake { | ||
solutionPath=$1 | ||
configuration=$2 | ||
platform=$3 | ||
framework=$4 | ||
|
||
BUILD_CMD="dotnet build -nologo --verbosity m -p:UseAppHost=true \"$solutionPath\" --configuration \"$configuration\"" | ||
echoMessage="Compiling $solutionPath in ${configuration}|${platform}" | ||
if [ -n "$framework" ]; then | ||
BUILD_CMD="$BUILD_CMD --framework \"$framework\"" | ||
echoMessage="$echoMessage|${framework}" | ||
fi | ||
|
||
echo $echoMessage | ||
echo $BUILD_CMD | ||
eval $BUILD_CMD | ||
if [ $? -ne 0 ]; then | ||
echo ERROR: Failed to compile $solutionPath in "${configuration}|${platform}|". | ||
exit 1 | ||
fi | ||
} | ||
|
||
# fail immediately if anything goes wrong | ||
set -e | ||
|
||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
which dotnet > /dev/null | ||
DOTNET_FOUND=$? | ||
if [ $DOTNET_FOUND -ne 0 ]; then | ||
echo "dotnet not found, see https://dotnet.microsoft.com/download" | ||
exit $DOTNET_FOUND | ||
fi | ||
|
||
SOLUTION_PATH=${1:-"${CURRENT_DIR}/Sharpmake.sln"} | ||
CONFIGURATION=${2:-"Debug"} | ||
PLATFORM=${3:-"Any CPU"} | ||
FRAMEWORK=$4 | ||
|
||
BuildSharpmake "$SOLUTION_PATH" "$CONFIGURATION" "$PLATFORM" "$FRAMEWORK" |
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.