|
1 | 1 | #!/usr/bin/env bash |
2 | | -########################################################################## |
3 | | -# This is the Cake bootstrapper script for Linux and OS X. |
4 | | -# This file was downloaded from https://github.com/cake-build/resources |
5 | | -# Feel free to change this file to fit your needs. |
6 | | -########################################################################## |
7 | | - |
8 | | -# Define directories. |
9 | | -SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
10 | | -TOOLS_DIR=$SCRIPT_DIR/tools |
11 | | -TOOLS_PROJ=$TOOLS_DIR/tools.csproj |
12 | | -CAKE_VERSION=0.29.0 |
13 | | -CAKE_DLL=$TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION/cake.coreclr/$CAKE_VERSION/Cake.dll |
14 | | -DOTNET_INSTALL_PATH=$SCRIPT_DIR/.dotnet |
15 | | - |
16 | | -# Make sure the tools folder exist. |
17 | | -if [ ! -d "$TOOLS_DIR" ]; then |
18 | | - mkdir "$TOOLS_DIR" |
19 | | -fi |
20 | 2 |
|
21 | | -########################################################################### |
22 | | -# Install .NET Core CLI |
23 | | -########################################################################### |
24 | | -curl -sSL https://dot.net/dotnet-install.sh | bash /dev/stdin --channel current --version 2.1.400 --install-dir $DOTNET_INSTALL_PATH |
25 | | - |
26 | | -########################################################################### |
27 | | -# INSTALL CAKE |
28 | | -########################################################################### |
29 | | -if [ ! -f "$CAKE_DLL" ]; then |
30 | | - echo "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><TargetFramework>netcoreapp2.0</TargetFramework></PropertyGroup></Project>" > $TOOLS_PROJ |
31 | | - dotnet add $TOOLS_PROJ package cake.coreclr -v $CAKE_VERSION --package-directory $TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION |
32 | | -fi |
33 | | - |
34 | | -# Make sure that Cake has been installed. |
35 | | -if [ ! -f "$CAKE_DLL" ]; then |
36 | | - echo "Could not find Cake.exe at '$CAKE_DLL'." |
37 | | - exit 1 |
38 | | -fi |
39 | | - |
40 | | -########################################################################### |
41 | | -# RUN BUILD SCRIPT |
42 | | -########################################################################### |
43 | | - |
44 | | -# Start Cake |
45 | | -CAKE_SETTINGS_SKIPVERIFICATION=true exec dotnet "$CAKE_DLL" "$@" |
| 3 | +docker build . |
0 commit comments