forked from SonarSource/SonarJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cix.sh
47 lines (36 loc) · 914 Bytes
/
cix.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
#!/bin/bash
set -euo pipefail
echo "Running $TEST with SQ=$SQ_VERSION"
function install_nodejs_win() {
if [[ "$OSTYPE" != "msys" && "$OSTYPE" != "cygwin" ]]; then
echo "Skipping NodeJS installation for nix OS"
return
fi
#install npm
node_home=$(pwd)/node-v8.9.0-win-x64
node_archive=node.7z
if [ ! -d "$node_home" ]; then
echo "=== Install Node.js ===";
curl --insecure --silent --show-error -o $node_archive https://nodejs.org/dist/v8.9.0/node-v8.9.0-win-x64.7z;
7z x $node_archive;
rm $node_archive;
fi
chmod 755 $node_home/node;
export PATH=$node_home:$PATH;
echo "Node version"
node -v
}
install_nodejs_win
case "$TEST" in
ci)
mvn clean package
;;
plugin|ruling)
cd its/$TEST
mvn -B -e -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false package
;;
*)
echo "Unexpected TEST mode: $TEST"
exit 1
;;
esac