forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·68 lines (51 loc) · 1.45 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
work_dir=`pwd`
build_tools=$work_dir/.build
nuget_path=$build_tools/nuget.exe
configuration="Debug"
dotnet=$work_dir/.dotnet/bin/dotnet
artifacts=$work_dir/artifacts
log_output=$artifacts/logs
. ./scripts/tasks.sh
#########################
# Main
if [ "$1" == "--quick" ]; then
install_dotnet
publish "OmniSharp" || { echo >&2 "Failed to quick build. Try to build the OmniSharp without --quick switch."; exit 1; }
exit 0
fi
if [ "$1" == "--install" ]; then
if [ -d ~/.omnisharp/local ]; then
echo "Removing local omnisharp ..."
rm -rf ~/.omnisharp/local
fi
mkdir -p ~/.omnisharp/local
publish "OmniSharp" "~/.omnisharp/local" || \
{ echo >&2 "Failed to quick build. Try to build the OmniSharp without --install switch."; exit 1; }
exit 0
fi
# Clean up
header "Cleanup"
rm -rf artifacts
# Set up
mkdir -p $build_tools
mkdir -p $log_output
install_dotnet
install_nuget
install_xunit_runner
set_dotnet_reference_path
# Restore
restore_packages
# Testing
run_test OmniSharp.Bootstrap.Tests
run_test OmniSharp.MSBuild.Tests -skipdnxcore50
run_test OmniSharp.Roslyn.CSharp.Tests -skipdnx451
run_test OmniSharp.Stdio.Tests
# Packaging
for project in `ls src`; do
package "OmniSharp.Abstractions"
done
# OmniSharp.Roslyn.CSharp.Tests is skipped on dnx451 target because an issue in MEF assembly load on xunit
# Failure repo: https://github.com/troydai/loaderfailure
# Publish
publish "OmniSharp"