forked from fastquant/fastquant.dll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
45 lines (35 loc) · 1.13 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
work_dir=`pwd`
build_tools=$work_dir/.build
header() {
if [ "$TRAVIS" == true ]; then
printf "%b\n" "*** $1 ***"
else
printf "%b\n" "\e[1;32m*** $1 ***\e[0m"
fi
}
header "Cleanup"
rm -rf artifacts
mkdir -p $build_tools
header "Installing dotnet"
DOTNET_CHANNEL="beta"
DOTNET_VERSION="1.0.0.001897"
DOTNET_INSTALL="$work_dir/.dotnet"
DOTNET_SCRIPT="https://raw.githubusercontent.com/dotnet/cli/43ac2b45f4173b8228b44c8a9693ac7774104cbb/scripts/obtain/install.sh"
DOTNET="$work_dir/.dotnet/cli/dotnet"
echo "Installing dotnet from $DOTNET_CHANNEL channel for version $DOTNET_VERSION"
echo "Execute install script"
echo " source: $DOTNET_SCRIPT"
echo " version: $DOTNET_VERSION"
echo " channel: $DOTNET_CHANNEL"
echo " install: $DOTNET_INSTALL"
bash -c "`curl -s $DOTNET_SCRIPT`" install.sh -c $DOTNET_CHANNEL -v $DOTNET_VERSION -d $DOTNET_INSTALL
$DOTNET --version # || { echo >&2 "dotnet is not installed correctly" && exit 1 }
# Handle to many files on osx
if [ "$TRAVIS_OS_NAME" == "osx" ] || [ `uname` == "Darwin" ]; then
ulimit -n 4096
fi
# Build
header "Building"
$DOTNET restore src
$DOTNET publish