make all build script calls relative
This commit is contained in:
parent
5669222c5c
commit
4dbdcfce7a
|
|
@ -1,5 +1,5 @@
|
|||
if which pmd >/dev/null; then
|
||||
# running CPD
|
||||
readonly CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
readonly SOURCES_DIR=${1:-${PROJECT_DIR}} # first argument or PROJECT_DIR
|
||||
readonly REPORTS_DIR=${PROJECT_DIR}/code-quality-reports
|
||||
readonly FILES_TO_EXCLUDE=`find ${SOURCES_DIR} -type d -name Localization -or -name Generated -or -name Carthage -or -name Pods | paste -sd " " -`
|
||||
|
|
@ -8,7 +8,7 @@ if which pmd >/dev/null; then
|
|||
|
||||
pmd cpd --files ${SOURCES_DIR} --exclude ${FILES_TO_EXCLUDE} --minimum-tokens 50 --language swift --encoding UTF-8 --format net.sourceforge.pmd.cpd.XMLRenderer > ${REPORTS_DIR}/cpd-output.xml --failOnViolation true
|
||||
|
||||
php ./build-scripts/xcode/aux_scripts/cpd_script.php ${REPORTS_DIR}/cpd-output.xml | tee ${REPORTS_DIR}/CPDLog.txt
|
||||
php ${CURRENT_DIR}/../aux_scripts/cpd_script.php ${REPORTS_DIR}/cpd-output.xml | tee ${REPORTS_DIR}/CPDLog.txt
|
||||
|
||||
# Make paths relative to SOURCES_DIR, so different developers won't rewrite entire file
|
||||
readonly SED_REPLACEMENT_STRING=$(echo ${SOURCES_DIR} | sed "s/\//\\\\\//g")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
arguments=("$@")
|
||||
ignored_files=$(IFS=, ; echo "${arguments[*]}")
|
||||
readonly ARGUMENTS=("$@")
|
||||
readonly IGNORED_FILES=$(IFS=, ; echo "${ARGUMENTS[*]}")
|
||||
readonly CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
ruby ${PROJECT_DIR}/build-scripts/xcode/build_phases/Unused.rb --config ${PROJECT_DIR}/build-scripts/xcode/UnusedConfig.yml --exclude ${ignored_files}
|
||||
ruby ${CURRENT_DIR}/Unused.rb --config ${CURRENT_DIR}/../UnusedConfig.yml --exclude ${IGNORED_FILES}
|
||||
|
|
|
|||
Loading…
Reference in New Issue