|
@@ -61,7 +61,7 @@ dockerCompose="${dockerCompose} ${composeFiles}"
|
|
|
|
|
|
handleServices()
|
|
handleServices()
|
|
{
|
|
{
|
|
- IFS=" " read -r -a validServices <<< "${1}"
|
|
|
|
|
|
+ validServices=($1)
|
|
servicesArray=()
|
|
servicesArray=()
|
|
invalidServices=false
|
|
invalidServices=false
|
|
for x in "${@:2}"; do
|
|
for x in "${@:2}"; do
|
|
@@ -283,14 +283,12 @@ case $1 in
|
|
|
|
|
|
lint|eslint)
|
|
lint|eslint)
|
|
echo -e "${CYAN}Musare | Lint${NC}"
|
|
echo -e "${CYAN}Musare | Lint${NC}"
|
|
- # shellcheck disable=SC2001
|
|
|
|
services=$(sed "s/\(\ \)\{0,1\}\(-\)\{0,2\}fix//g;t;q1" <<< "${@:2}")
|
|
services=$(sed "s/\(\ \)\{0,1\}\(-\)\{0,2\}fix//g;t;q1" <<< "${@:2}")
|
|
fixFound=$?
|
|
fixFound=$?
|
|
if [[ $fixFound -eq 0 ]]; then
|
|
if [[ $fixFound -eq 0 ]]; then
|
|
fix="--fix"
|
|
fix="--fix"
|
|
echo -e "${GREEN}Auto-fix enabled${NC}"
|
|
echo -e "${GREEN}Auto-fix enabled${NC}"
|
|
fi
|
|
fi
|
|
- # shellcheck disable=SC2001
|
|
|
|
services=$(sed "s/\(\ \)\{0,1\}\(-\)\{0,2\}no-cache//g;t;q1" <<< "${services}")
|
|
services=$(sed "s/\(\ \)\{0,1\}\(-\)\{0,2\}no-cache//g;t;q1" <<< "${services}")
|
|
noCacheFound=$?
|
|
noCacheFound=$?
|
|
cache="--cache"
|
|
cache="--cache"
|
|
@@ -303,12 +301,12 @@ case $1 in
|
|
if [[ ${servicesString:0:1} == 1 ]]; then
|
|
if [[ ${servicesString:0:1} == 1 ]]; then
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *frontend* ]]; then
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *frontend* ]]; then
|
|
echo -e "${CYAN}Running frontend lint...${NC}"
|
|
echo -e "${CYAN}Running frontend lint...${NC}"
|
|
- ${dockerCompose} exec -T frontend npx eslint "${cache}" src --ext .js,.ts,.vue "${fix}"
|
|
|
|
|
|
+ ${dockerCompose} exec -T frontend npx eslint $cache src --ext .js,.ts,.vue $fix
|
|
frontendExitValue=$?
|
|
frontendExitValue=$?
|
|
fi
|
|
fi
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *backend* ]]; then
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *backend* ]]; then
|
|
echo -e "${CYAN}Running backend lint...${NC}"
|
|
echo -e "${CYAN}Running backend lint...${NC}"
|
|
- ${dockerCompose} exec -T backend npx eslint "${cache}" logic "${fix}"
|
|
|
|
|
|
+ ${dockerCompose} exec -T backend npx eslint $cache logic $fix
|
|
backendExitValue=$?
|
|
backendExitValue=$?
|
|
fi
|
|
fi
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *docs* ]]; then
|
|
if [[ ${servicesString:2:4} == "all" || "${servicesString:2}" == *docs* ]]; then
|