mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-28 02:48:40 +00:00
Restructure
This commit is contained in:
parent
38138209ba
commit
aa16b1a21a
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start html attributes inspection\n"
|
||||
echo "Start html attributes inspection"
|
||||
|
||||
# Find empty attributes
|
||||
grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${INSPECTION_PATH}/Modules/html/attributes_empty.log
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start html tags inspection\n"
|
||||
echo "Start html tags inspection"
|
||||
|
||||
# Html tag inspection
|
||||
TAG[0]="<\/html>"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start js security inspection\n"
|
||||
echo "Start js security inspection"
|
||||
|
||||
# JS code inspection
|
||||
CODE[0]="onload"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start json linting inspection\n"
|
||||
echo "Start json linting inspection"
|
||||
|
||||
find ${ROOT_PATH} -name "*.json" | xargs -L1 jsonlint -q > ${INSPECTION_PATH}/Modules/linting/linting_json.log
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start php linting inspection\n"
|
||||
echo "Start php linting inspection"
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start php security inspection\n"
|
||||
echo "Start php security inspection"
|
||||
|
||||
# PHP code inspection
|
||||
CODE[0]="file_get_content"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start php stats inspection\n"
|
||||
echo "Start php stats inspection"
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Start php style inspection\n"
|
||||
echo "Start php style inspection"
|
||||
|
||||
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=/Framework/phpcs.log
|
||||
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Framework/phpcs.log
|
||||
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Modules/phpcs.log
|
||||
#php ${TOOLS_PATH}/phpmd.phar ${ROOT_PATH}/phpOMS text ${BUILD_PATH}/Config/phpmd.xml --exclude *tests* --minimumpriority 1
|
||||
14
Inspection/Php/tests.sh
Normal file
14
Inspection/Php/tests.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
. config.sh
|
||||
|
||||
echo "Start php unit tests inspection"
|
||||
|
||||
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
|
||||
|
||||
echo "Start php static inspection"
|
||||
|
||||
php ${TOOLS_PATH}/phpstan.phar analyse --autoload-file=${ROOT_PATH}/phpOMS/Autoloader.php -l 7 ${ROOT_PATH}/phpOMS > ${INSPECTION_PATH}/Framework/phpstan.log
|
||||
php ${TOOLS_PATH}/phpstan.phar analyse --autoload-file=${ROOT_PATH}/phpOMS/Autoloader.php -l 7 ${ROOT_PATH}/Modules > ${INSPECTION_PATH}/Modules/phpstan.log
|
||||
php ${TOOLS_PATH}/phpstan.phar analyse --autoload-file=${ROOT_PATH}/phpOMS/Autoloader.php -l 7 ${ROOT_PATH}/Model > ${INSPECTION_PATH}/Model/phpstan.log
|
||||
php ${TOOLS_PATH}/phpstan.phar analyse --autoload-file=${ROOT_PATH}/phpOMS/Autoloader.php -l 7 ${ROOT_PATH}/Web > ${INSPECTION_PATH}/Web/phpstan.log
|
||||
|
|
@ -12,7 +12,7 @@ mysql -e 'create database oms;' -u ${DB_USER} -p${DB_PASSWORD}
|
|||
#. Js/build.sh
|
||||
|
||||
# Executing unit tests
|
||||
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
|
||||
. ${BUILD_PATH}/Inspection/Php/tests.sh
|
||||
|
||||
# Stats & metrics
|
||||
. ${BUILD_PATH}/Inspection/Php/stats.sh
|
||||
|
|
|
|||
8
setup.sh
8
setup.sh
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
. config.sh
|
||||
|
||||
echo "Remove old setup"
|
||||
|
||||
# Previous cleanup
|
||||
rm -r -f ${ROOT_PATH}
|
||||
rm -r -f ${BASE_PATH}/Website
|
||||
|
|
@ -15,6 +17,8 @@ mkdir -p ${INSPECTION_PATH}
|
|||
|
||||
cd ${BASE_PATH}
|
||||
|
||||
echo "Setup repositories"
|
||||
|
||||
# Create git repositories
|
||||
for i in "${GITHUB_URL[@]}"
|
||||
do
|
||||
|
|
@ -25,6 +29,8 @@ cd ${ROOT_PATH}
|
|||
git submodule update --init --recursive
|
||||
git submodule foreach git checkout develop
|
||||
|
||||
echo "Setup build output"
|
||||
|
||||
# Creating directories for inspection
|
||||
mkdir -p ${INSPECTION_PATH}/logs
|
||||
mkdir -p ${INSPECTION_PATH}/Framework/logs
|
||||
|
|
@ -59,6 +65,8 @@ mkdir -p ${TOOLS_PATH}
|
|||
|
||||
cd ${TOOLS_PATH}
|
||||
|
||||
echo "Setup tools"
|
||||
|
||||
# Downloading tools
|
||||
wget -nc https://getcomposer.org/composer.phar
|
||||
wget -nc https://phar.phpunit.de/phploc.phar
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user