Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
php-compat
Commits
8c5175dc
Commit
8c5175dc
authored
Mar 08, 2019
by
Bertrand Gauthier
Browse files
Correction des scripts de lancement des analyses avec PHAN et PHPCS.
parent
82cd36b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/unicaen-php-compat-run-phan
View file @
8c5175dc
...
...
@@ -12,12 +12,10 @@ containername=${imagename}-container
unicaenlogfile
=
"/tmp/unicaen-php-compat-phan-unicaen-
${
v
}
.log"
vendorslogfile
=
"/tmp/unicaen-php-compat-phan-vendors-
${
v
}
.log"
DIR
=
$(
cd
`
dirname
$0
`
&&
pwd
)
echo
"==================================================================================="
echo
" Construction de l'image
${
imagename
}
"
echo
"==================================================================================="
docker-compose
-f
vendor/unicaen/php-compat/docker-compose.yml build
${
imagename
}
docker-compose
-f
vendor/unicaen/php-compat/docker-compose.yml
up
-d
--
build
${
imagename
}
[[
$?
!=
0
]]
&&
echo
"Erreur bloquante, ciao."
&&
exit
1
...
...
bin/unicaen-php-compat-run-phpcs
View file @
8c5175dc
...
...
@@ -6,14 +6,18 @@ DIR=$(cd `dirname $0` && pwd)
v
=
$1
# conversion de la version spécifiée au format PHP_VERSION_ID, ex: "7.2" devien "70200"
a
=(
${
v
//./
}
)
PHP_VERSION_ID
=
$((
a[0]
*
10000
+
a[1]
*
100
+
a[2]
))
vendors
=
"vendor/doctrine vendor/zendframework vendor/zf-commons"
imagename
=
"unicaen-php-compat-
${
v
}
"
containername
=
${
imagename
}
-container
unicaenlogfile
=
"/tmp/unicaen-php-compat-phpcs-unicaen-
${
v
}
.log"
vendorslogfile
=
"/tmp/unicaen-php-compat-phpcs-vendors-
${
v
}
.log"
DIR
=
$(
cd
`
dirname
$0
`
&&
pwd
)
echo
"==================================================================================="
echo
" Construction de l'image
${
imagename
}
"
echo
"==================================================================================="
...
...
@@ -25,7 +29,7 @@ echo
echo
"==================================================================================="
echo
" Composer update dans le container
${
containername
}
"
echo
"==================================================================================="
docker
exec
${
containername
}
composer update
--no-suggest
--no-scripts
docker
exec
${
containername
}
composer update
--no-suggest
[[
$?
!=
0
]]
&&
echo
"Erreur bloquante, ciao."
&&
exit
1
...
...
@@ -33,14 +37,29 @@ echo
echo
"==================================================================================="
echo
" Analyse PHPCS des modules unicaen/* installés"
echo
"==================================================================================="
docker
exec
${
containername
}
vendor/unicaen/php-compat/bin/phpcs.sh
${
v
}
>
${
unicaenlogfile
}
docker
exec
\
${
containername
}
\
vendor/bin/phpcs
\
-n
\
--standard
=
PHPCompatibility
\
--runtime-set
php_version
${
PHP_VERSION_ID
}
\
vendor/unicaen
\
>
${
unicaenlogfile
}
echo
"See '
${
unicaenlogfile
}
'."
#echo
#echo "==================================================================================="
#echo " Analyse PHPCS des principaux vendors installés"
#echo "==================================================================================="
#docker exec ${containername} vendor/unicaen/php-compat/bin/phpcs.sh ${v} > ${unicaenlogfile}
#echo "See '${unicaenlogfile}'."
echo
echo
"==================================================================================="
echo
" Analyse PHPCS des principaux vendors installés"
echo
" (
${
vendors
}
)"
echo
"==================================================================================="
docker
exec
\
${
containername
}
\
vendor/bin/phpcs
\
-n
\
--standard
=
PHPCompatibility
\
--runtime-set
php_version
${
PHP_VERSION_ID
}
\
${
vendors
}
\
>
${
vendorslogfile
}
echo
"See '
${
vendorslogfile
}
'."
echo
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment