Repository navigation
Expand file tree
/
Copy pathlinting.sh
More file actions
executable file
·69 lines (55 loc) · 2.39 KB
/
Copy pathlinting.sh
File metadata and controls
executable file
·69 lines (55 loc) · 2.39 KB
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
#!/usr/bin/env bash
#
# Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.
#
ONE_BACK='..'
TWO_BACK='../..'
THREE_BACK='../../..'
FOUR_BACK='../../../..'
FIVE_BACK='../../../../..'
SIX_BACK='../../../../../..'
GRUNT_DIR=./node_modules/grunt-cli
GRUNT_BIN=$GRUNT_DIR/bin/grunt
if [ -d "$GRUNT_DIR" ]; then
#List all feature directories from where we need to run the test cases
featureDirectories=(monitor/infra monitor/tenant_network js config/vn)
IFS=',' read -ra REPOS <<< "$1"
for REPO in "${REPOS[@]}"; do
echo $REPO
if [ $REPO = 'webCore' ] ; then
echo "*********************************************"
echo "* Web Core CSS Linting *"
echo -e "*********************************************\n\n"
$GRUNT_BIN csslint
echo "DONE"
fi
if [ $REPO = 'webController' ] ; then
echo "**************************************************"
echo "* Web Controller CSS Linting *"
echo -e "**************************************************\n\n"
$GRUNT_BIN csslint --src=../contrail-web-controller/webroot/**/*.css
echo "DONE"
fi
if [ $REPO = 'serverManager' ] ; then
echo "*******************************************"
echo "* Server Manager CSS Linting *"
echo -e "*******************************************\n\n"
$GRUNT_BIN csslint --src=../contrail-web-server-manager/webroot/**/*.css
echo "DONE"
fi
if [ $REPO = 'webStorage' ] ; then
echo "*******************************************"
echo "* Web Storage CSS Linting *"
echo -e "*******************************************\n\n"
$GRUNT_BIN csslint --src=../contrail-web-storage/webroot/**/*.css
echo "DONE"
fi
done
else
echo -e "\033[31m<<<<<<<<<<<<<<< Warning! >>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
echo "Unable to find local node_modules for Grunt. UT execution requires Grunt modules."
echo "To setup UT enviornment: "
echo "Run make fetch-pkgs-dev from contrail-web-core repo; and do prod-env or dev-env with respective 'REPO=' arg set."
echo -e "\033[31m<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
exit 0
fi