forked from dotnet/vscode-dotnet-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·89 lines (78 loc) · 1.71 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
echo ""
echo "----------- Bundling Install Scripts -----------"
echo ""
curl https://dot.net/v1/dotnet-install.ps1 --retry 2 -o "./vscode-dotnet-runtime-library/install scripts/dotnet-install.ps1"
curl https://dot.net/v1/dotnet-install.sh --retry 2 -o "./vscode-dotnet-runtime-library/install scripts/dotnet-install.sh"
if [ $? -eq 0 ];
then
echo ""
echo "${GREEN}Bundled install scripts${NC}"
else
echo ""
echo "${RED}Unable to bundle install scripts${NC}"
fi
chmod +x "./vscode-dotnet-runtime-library/install scripts/dotnet-install.ps1"
chmod +x "./vscode-dotnet-runtime-library/install scripts/dotnet-install.sh"
echo ""
echo "----------- Compiling vscode-dotnet-runtime-library -----------"
echo ""
pushd vscode-dotnet-runtime-library
rm -rf node_modules
npm ci
npm run compile
if [ $? -ne 0 ];
then
echo ""
echo "${RED}Build failed!${NC}"
exit 1
fi
popd
echo ""
echo "----------- Compiling vscode-dotnet-runtime-extension -----------"
echo ""
pushd vscode-dotnet-runtime-extension
rm -rf node_modules
npm ci
npm run compile
if [ $? -ne 0 ];
then
echo ""
echo "${RED}Build failed!${NC}"
exit 1
fi
popd
echo ""
echo "----------- Compiling vscode-dotnet-sdk-extension -----------"
echo ""
pushd vscode-dotnet-sdk-extension
rm -rf node_modules
npm ci
npm run compile
if [ $? -ne 0 ];
then
echo ""
echo "${RED}Build failed!${NC}"
exit 1
fi
popd
echo ""
echo "----------- Compiling sample -----------"
echo ""
pushd sample
rm -rf node_modules
npm ci
npm run compile
if [ $? -ne 0 ];
then
echo ""
echo "${RED}Build failed!${NC}"
exit 1
fi
popd
/bin/bash ./mock-webpack.sh
echo ""
echo "${GREEN}Build succeeded!${NC}"
exit 0