Skip to content

Commit 0f54e40

Browse files
committed
Switch to comma- instead of space-separated paths to scan
1 parent c9344a5 commit 0f54e40

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

scripts/findTypescriptDataFiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ if [ ! -d "./${ARTIFACTS_DIRECTORY}/${TYPESCRIPT_ARTIFACTS_DIRECTORY}" ] ; then
2626
return 0
2727
fi
2828

29-
find "./${ARTIFACTS_DIRECTORY}/${TYPESCRIPT_ARTIFACTS_DIRECTORY}" -type f -name '*.json' -exec echo {} \; | sed 's/^/typescript:project::/' | tr '\n' ' '
29+
find "./${ARTIFACTS_DIRECTORY}/${TYPESCRIPT_ARTIFACTS_DIRECTORY}" -type f -name '*.json' -exec echo typescript:project::{} \; | tr '\n' ',' | sed 's/,$/\n/'

scripts/resetAndScan.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,27 @@ else
6060
echo "resetAndScan: jQAssistant configuration won't be changed since it already exists."
6161
fi
6262

63-
directoriesAndFilesToScan="${ARTIFACTS_DIRECTORY} $(source ${SCRIPTS_DIR}/findTypescriptDataFiles.sh)"
63+
# Collect all files and directories to scan
64+
directoriesAndFilesToScan=""
65+
66+
# Scan all files in the artifacts directory (e.g. *.ear, *.war, *.jar for Java)
67+
if [ -d "${ARTIFACTS_DIRECTORY}" ] ; then
68+
directoriesAndFilesToScan="${directoriesAndFilesToScan},./${ARTIFACTS_DIRECTORY}"
69+
fi
70+
71+
# Scan Typescript analysis json data files in the artifacts/typescript directory
72+
typescriptAnalysisFiles="$(source "${SCRIPTS_DIR}/findTypescriptDataFiles.sh")"
73+
if [ -n "${typescriptAnalysisFiles}" ]; then
74+
directoriesAndFilesToScan="${directoriesAndFilesToScan},${typescriptAnalysisFiles}"
75+
fi
6476

6577
# Use jQAssistant to scan the downloaded artifacts and write the results into the separate, local Neo4j Graph Database
6678
echo "resetAndScan: Using jQAssistant CLI version ${JQASSISTANT_CLI_VERSION} to scan: ${directoriesAndFilesToScan}"
6779

68-
"${JQASSISTANT_BIN}"/jqassistant.sh scan -f ./${directoriesAndFilesToScan}
80+
"${JQASSISTANT_BIN}"/jqassistant.sh scan -f "${directoriesAndFilesToScan}"
6981

7082
# Use jQAssistant to add dependencies between artifacts, package dependencies, artifact dependencies and the java version to the Neo4j Graph Database
71-
echo "resetAndScan: Analyzing ${ARTIFACTS_DIRECTORY} with jQAssistant CLI version ${JQASSISTANT_CLI_VERSION}"
83+
echo "resetAndScan: Analyzing using jQAssistant CLI version ${JQASSISTANT_CLI_VERSION}"
7284

7385
"${JQASSISTANT_BIN}"/jqassistant.sh analyze
7486

0 commit comments

Comments
 (0)