Skip to content

Commit

Permalink
Fix dotnet runtime hardcoded path on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer committed Dec 28, 2017
1 parent 8b3092c commit 2b0e43c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ install:
# `Cake.dll` is targeting `.NET Core` `1.0.3`, so we need to install the latest `1.0.x` runtime
# The runtime is required to run a `.NET Core` application, it's part of the `SDK`
# https://github.com/dotnet/core/blob/master/release-notes/download-archive.md
- tools/dotnet-install.sh --shared-runtime --version 1.0.8
- export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
- tools/dotnet-install.sh --shared-runtime --version 1.0.8 --install-dir "$DOTNET_INSTALL_DIR"
- export PATH="$DOTNET_INSTALL_DIR:$PATH"
script:
- ./build.sh --pack
10 changes: 1 addition & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,5 @@ if [ ! -f "$CAKE_DLL" ]; then
exit 1
fi

# We installed the 1.0.8 dotnet core runtime in a child script
# hence the dotnet path has not been exported (`sourcing`) is
# not supported in Travis CI
dotnet_binary="dotnet"
if [[ $TRAVIS == "true" ]]; then
dotnet_binary="/home/travis/.dotnet/dotnet"
fi

# Start Cake
exec "$dotnet_binary" "$CAKE_DLL" $SCRIPT "${CAKE_ARGUMENTS[@]}"
exec dotnet "$CAKE_DLL" $SCRIPT "${CAKE_ARGUMENTS[@]}"

0 comments on commit 2b0e43c

Please sign in to comment.