forked from cake-archive/frosting
-
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.
(cake-archiveGH-80) Add build.sh for building on posix
In order to get this to compile, I had to remove the 461 target. Could be that there is something else that can be done here.
- Loading branch information
Showing
6 changed files
with
70 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
# Define varibles | ||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
source $SCRIPT_DIR/build.config | ||
TOOLS_DIR=$SCRIPT_DIR/tools | ||
|
||
if [ "$DOTNET_VERSION" = "" ]; then | ||
echo "An error occured while parsing .NET Core SDK version." | ||
exit 1 | ||
fi | ||
|
||
# Make sure the tools folder exist. | ||
if [ ! -d "$TOOLS_DIR" ]; then | ||
mkdir "$TOOLS_DIR" | ||
fi | ||
|
||
########################################################################### | ||
# INSTALL .NET CORE CLI | ||
########################################################################### | ||
|
||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 | ||
export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 | ||
|
||
DOTNET_INSTALLED_VERSION=$(dotnet --version 2>&1) | ||
|
||
if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then | ||
echo "Installing .NET CLI..." | ||
if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then | ||
mkdir "$SCRIPT_DIR/.dotnet" | ||
fi | ||
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh | ||
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir .dotnet --no-path | ||
export PATH="$SCRIPT_DIR/.dotnet":$PATH | ||
export DOTNET_ROOT="$SCRIPT_DIR/.dotnet" | ||
fi | ||
|
||
########################################################################### | ||
# RUN BUILD SCRIPT | ||
########################################################################### | ||
|
||
echo "Running build script.." | ||
pushd . | ||
echo "Changing to build folder..." | ||
cd build | ||
echo "dotnet run..." | ||
dotnet run --project Build.csproj -- "$@" | ||
echo "going back to previous folder..." | ||
popd |
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 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