diff --git a/Inspection/Html/attributes.sh b/Inspection/Html/attributes.sh index 47ca22d..bb91efa 100644 --- a/Inspection/Html/attributes.sh +++ b/Inspection/Html/attributes.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh # Find empty attributes grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${INSPECTION_PATH}/Modules/html/attributes_empty.log diff --git a/Inspection/Html/tags.sh b/Inspection/Html/tags.sh index 5667379..e3129bc 100644 --- a/Inspection/Html/tags.sh +++ b/Inspection/Html/tags.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh # Html tag inspection TAG[0]="<\/html>" diff --git a/Inspection/Js/security.sh b/Inspection/Js/security.sh index 3c8c068..800e0c8 100644 --- a/Inspection/Js/security.sh +++ b/Inspection/Js/security.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh # JS code inspection CODE[0]="onload" diff --git a/Inspection/Json/linting.sh b/Inspection/Json/linting.sh index 4bcd1f9..61dbf53 100644 --- a/Inspection/Json/linting.sh +++ b/Inspection/Json/linting.sh @@ -1,5 +1,5 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh find ${ROOT_PATH} -name "*.json" | xargs -L1 jsonlint -q > ${INSPECTION_PATH}/Modules/linting/linting_json.log \ No newline at end of file diff --git a/Inspection/Php/linting.sh b/Inspection/Php/linting.sh index 0c44350..a42ec12 100644 --- a/Inspection/Php/linting.sh +++ b/Inspection/Php/linting.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh find ${ROOT_PATH}/phpOMS -name "*.php" | xargs -L1 php -l > ${INSPECTION_PATH}/logs/temp.log sed '/^No syntax.*/ d' < ${INSPECTION_PATH}/logs/temp.log > ${INSPECTION_PATH}/Framework/linting/linting_php.log diff --git a/Inspection/Php/security.sh b/Inspection/Php/security.sh index 87bb3dc..2e85298 100644 --- a/Inspection/Php/security.sh +++ b/Inspection/Php/security.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh # PHP code inspection CODE[0]="file_get_content" diff --git a/Inspection/Php/stats.sh b/Inspection/Php/stats.sh index d507d2b..31d0aa4 100644 --- a/Inspection/Php/stats.sh +++ b/Inspection/Php/stats.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh php ${TOOLS_PATH}/phploc.phar ${ROOT_PATH}/phpOMS/ > ${INSPECTION_PATH}/Framework/phploc.log php ${TOOLS_PATH}/phploc.phar ${ROOT_PATH}/Modules/ > ${INSPECTION_PATH}/Modules/phploc.log diff --git a/Inspection/Php/style.sh b/Inspection/Php/style.sh index 0dbeee8..40df3f9 100644 --- a/Inspection/Php/style.sh +++ b/Inspection/Php/style.sh @@ -1,6 +1,6 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --colors --standard="${BUILD_PATH}/phpcs.xml" -s --report=full php ${TOOLS_PATH}/phpmd.phar ${ROOT_PATH}/phpOMS text ${BUILD_PATH}/phpmd.xml --exclude *tests* --minimumpriority 1 \ No newline at end of file diff --git a/Inspection/inspect.sh b/Inspection/inspect.sh index 3b0815a..99a15ff 100644 --- a/Inspection/inspect.sh +++ b/Inspection/inspect.sh @@ -1,7 +1,7 @@ #!/bin/bash # Include config -. config.sh +. ${BUILD_PATH}/config.sh # Setting up database for demo and testing mysql -e 'drop database if exists oms;' -u ${DB_USER} -p${DB_PASSWORD} @@ -15,18 +15,18 @@ mysql -e 'create database oms;' -u ${DB_USER} -p${DB_PASSWORD} php ${TOOLS_PATH}/phpunit.phar -v --configuration ${ROOT_PATH}/tests/phpunit_default.xml --log-junit ${INSPECTION_PATH}/Test/Php/junit_php.xml --testdox-html ${INSPECTION_PATH}/Test/Php/index.html --coverage-html ${INSPECTION_PATH}/Test/Php/coverage --coverage-clover ${INSPECTION_PATH}/Test/Php/coverage.xml > ${INSPECTION_PATH}/Test/Php/phpunit.log # Stats & metrics -. Inspection/Php/stats.sh +. ${BUILD_PATH}/Inspection/Php/stats.sh # Linting -. Inspection/Php/linting.sh -. Inspection/Json/linting.sh +. ${BUILD_PATH}/Inspection/Php/linting.sh +. ${BUILD_PATH}/Inspection/Json/linting.sh # Code style -. Inspection/Php/style.sh +. ${BUILD_PATH}/Inspection/Php/style.sh # Custom html inspections -. Inspection/Html/tags.sh -. Inspection/Html/attributes.sh +. ${BUILD_PATH}/Inspection/Html/tags.sh +. ${BUILD_PATH}/Inspection/Html/attributes.sh # Custom php inspections -. Inspection/Php/security.sh +. ${BUILD_PATH}/Inspection/Php/security.sh diff --git a/Js/build.sh b/Js/build.sh index c7e576d..7122ebe 100644 --- a/Js/build.sh +++ b/Js/build.sh @@ -1,10 +1,10 @@ #!/bin/bash -. config.sh +. ${BUILD_PATH}/config.sh -. Js/buildBase.sh -. Js/buildLib.sh -. Js/buildUI.sh -. Js/build3D.sh -. Js/buildChart.sh -. Js/buildSocket.sh \ No newline at end of file +. ${BUILD_PATH}/Js/buildBase.sh +. ${BUILD_PATH}/Js/buildLib.sh +. ${BUILD_PATH}/Js/buildUI.sh +. ${BUILD_PATH}/Js/build3D.sh +. ${BUILD_PATH}/Js/buildChart.sh +. ${BUILD_PATH}/Js/buildSocket.sh \ No newline at end of file diff --git a/buildProject.php b/buildProject.php index 3146854..f7c8b95 100644 --- a/buildProject.php +++ b/buildProject.php @@ -1,3 +1,3 @@ /dev/null &'); diff --git a/buildProject.sh b/buildProject.sh index 766c251..a04b205 100644 --- a/buildProject.sh +++ b/buildProject.sh @@ -9,7 +9,7 @@ cd ${ROOT_PATH} # Run inspection -. Inspection/inspect.sh +. ${BUILD_PATH}/Inspection/inspect.sh # Build documentation php ${TOOLS_PATH}/documentor.phar -s ${ROOT_PATH}/phpOMS -d ${BASE_PATH}/Inspection/Test/Php/docblock -c ${INSPECTION_PATH}/Test/Php/coverage.xml -u ${INSPECTION_PATH}/Test/Php/junit_php.xml -b http://docs.orange-management.de diff --git a/config.sh b/config.sh index bd7e3c8..479c38b 100644 --- a/config.sh +++ b/config.sh @@ -3,7 +3,7 @@ # Paths BASE_PATH="/var/www/html" ROOT_PATH="/var/www/html/Orange-Management" -BUILD_PATH="/var/www/Build" +BUILD_PATH="/var/www/html/Build" TOOLS_PATH="/var/www/html/Tools" RELEASE_PATH="/var/www/html/Release" @@ -19,7 +19,10 @@ DB_PASSWORD="123456" # Git variables GITHUB_URL[0]="https://github.com/Orange-Management/Orange-Management.git" -GITHUB_URL[1]="https://github.com/Orange-Management/Website.git" +GITHUB_URL[1]="https://github.com/Orange-Management/phpOMS.git" +GITHUB_URL[2]="https://github.com/Orange-Management/jsOMS.git" +GITHUB_URL[3]="https://github.com/Orange-Management/cssOMS.git" +GITHUB_URL[4]="https://github.com/Orange-Management/Website.git" GIT_BRANCH="develop" diff --git a/setup.sh b/setup.sh index 385ab88..d38ec68 100644 --- a/setup.sh +++ b/setup.sh @@ -5,6 +5,9 @@ # Previous cleanup rm -r -f ${ROOT_PATH} rm -r -f ${BASE_PATH}/Website +rm -r -f ${BASE_PATH}/phpOMS +rm -r -f ${BASE_PATH}/jsOMS +rm -r -f ${BASE_PATH}/cssOMS rm -r -f ${INSPECTION_PATH} mkdir -p ${INSPECTION_PATH} @@ -19,7 +22,7 @@ done cd ${ROOT_PATH} git submodule update --init --recursive -git submodule foreach checkout develop +git submodule foreach git checkout develop # Creating directories for inspection mkdir -p ${INSPECTION_PATH}/logs