forked from luigiberrettini/NLog.Targets.Syslog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (45 loc) · 1.72 KB
/
.travis.yml
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
language: csharp
matrix:
include:
- os: linux
dist: trusty
mono: latest
dotnet: 2.1.201
sudo: required
env: MONO_BASE_PATH=/usr/lib/mono/
- os: osx
osx_image: xcode10.3
mono: latest
dotnet: 2.1.201
sudo: required
env: MONO_BASE_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/
before_install:
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install jq
fi
DOTNET_INSTALL_DIR="$PWD/.dotnetsdk"
dotnetReleasesUrl='https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json'
dotnetReleases=$(curl --silent $dotnetReleasesUrl | jq ."\"releases-index\""[])
function installLatestDotNetSdk {
local channel=$1
version=$(echo $dotnetReleases | jq "select(.\"channel-version\" == \"$channel\") | .\"latest-sdk\"" | sed -e 's/^"//' -e 's/"$//')
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version "$version" --install-dir "$DOTNET_INSTALL_DIR" --no-path
}
installLatestDotNetSdk '1.1'
installLatestDotNetSdk '2.1'
installLatestDotNetSdk '2.2'
export PATH="$DOTNET_INSTALL_DIR:$PATH"
# See https://github.com/dotnet/cli/issues/9114
export DOTNET_ROOT="$DOTNET_INSTALL_DIR"
script:
- |
mostRecentTag=$(git describe --abbrev=0 --tags --always)
if [[ $mostRecentTag != v* ]]; then
mostRecentTag='v1.0.0'
if [[ "${TRAVIS_TAG}" != "" ]]; then exit 1; fi
fi
mostRecentVersion=$(echo "$mostRecentTag" | cut -c 2-)
FrameworkPathOverride=$MONO_BASE_PATH/4.5.2-api/ $(pwd)/build/scripts/bootstrap.sh '--target=Test' "--softwareVersion=$mostRecentVersion" "--buildNumber=$TRAVIS_BUILD_NUMBER"
notifications:
email: false