File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ echo "resetAndScan: SCRIPTS_DIR=${SCRIPTS_DIR}"
3232# Internal constants
3333JQASSISTANT_DIRECTORY=" ${TOOLS_DIRECTORY} /${JQASSISTANT_CLI_ARTIFACT} -${JQASSISTANT_CLI_VERSION} "
3434JQASSISTANT_BIN=" ${JQASSISTANT_DIRECTORY} /bin"
35- # JQASSISTANT_NEO4J_OPTIONS="-D jqassistant.store.uri=${NEO4J_BOLT_URI} -D jqassistant.store.remote.username=${NEO4J_USER} -D jqassistant.store.remote.password=${NEO4J_INITIAL_PASSWORD}"
36- # JQASSISTANT_NEO4J_OPTIONS=-configurationLocations "${JQASSISTANT_CONFIG}/.jqassistant.yaml"
35+ JQASSISTANT_CONFIG_TEMPLATE_PATH=" ${SCRIPTS_DIR} /configuration/${JQASSISTANT_CONFIG_TEMPLATE} "
3736
3837# Check if environment variable is set
3938if [ -z " ${NEO4J_INITIAL_PASSWORD} " ]; then
5554 echo " resetAndScan: Using jQAssistant binary directory ${JQASSISTANT_BIN} "
5655fi
5756
58- # Create jQAssistant configuration YAML file by copying a template for it
57+ # Create jQAssistant configuration YAML file by copying it from a corresponding template
5958mkdir -p " ./.jqassistant"
60- cp " ${SCRIPTS_DIR} /configuration/${JQASSISTANT_CONFIG_TEMPLATE} " " ./.jqassistant/"
59+
60+ echo " resetAndScan: Check if ./.jqassistant/${JQASSISTANT_CONFIG_TEMPLATE} needs to be copied."
61+ if [ ! -f " ./.jqassistant/${JQASSISTANT_CONFIG_TEMPLATE} " ]; then
62+ cp " ${JQASSISTANT_CONFIG_TEMPLATE_PATH} " " ./.jqassistant/"
63+ echo " resetAndScan: jQAssistant configuration copied from configuration template"
64+ else
65+ echo " resetAndScan: jQAssistant configuration won't be changed since it already exists."
66+ fi
6167
6268# Use jQAssistant to scan the downloaded artifacts and write the results into the separate, local Neo4j Graph Database
6369echo " resetAndScan: Scanning ${ARTIFACTS_DIRECTORY} with jQAssistant CLI version ${JQASSISTANT_CLI_VERSION} "
You can’t perform that action at this time.
0 commit comments