forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·24 lines (23 loc) · 942 Bytes
/
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
#!/bin/bash
rm -rf artifacts
if ! type kvm > /dev/null 2>&1; then
curl -sSL https://raw.githubusercontent.com/aspnet/Home/release/kvminstall.sh | sh && source ~/.k/kvm/kvm.sh
fi
export KRE_FEED=https://www.nuget.org/api/v2
kvm install 1.0.0-beta3
kpm restore
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
cd tests/OmniSharp.Tests
k test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
cd ../OmniSharp.Stdio.Tests
k test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
cd ../../
kvm use 1.0.0-beta3
kpm bundle src/OmniSharp --no-source --out artifacts/build/omnisharp --runtime kre-mono.1.0.0-beta3 2>&1 | tee buildlog
# work around for kpm bundle returning an exit code 0 on failure
grep "Build failed" buildlog
rc=$?; if [[ $rc == 0 ]]; then exit 1; fi
# work around for kpm pack not preserving the executable flag on klr when copied
chmod +x artifacts/build/omnisharp/approot/packages/kre-mono.1.0.0-beta3/bin/klr