Build system: Don't use Composer for dev dependencies
PHP_CodeSniffer and phpDocumentor are external tools which should never affect Pico's environment, thus we rather use PHARs in the future.
This commit is contained in:
parent
6e6d80c044
commit
56659ab95d
2 changed files with 21 additions and 5 deletions
|
@ -9,11 +9,31 @@ case "$1" in
|
|||
echo "Synchronizing package index files..."
|
||||
sudo apt-get update
|
||||
|
||||
echo "Installing packages..."
|
||||
echo "Installing cloc..."
|
||||
sudo apt-get install -y cloc
|
||||
|
||||
echo "Installing phpDocumentor..."
|
||||
curl --location --output "$PICO_TOOLS_DIR/phpdoc" \
|
||||
"https://github.com/phpDocumentor/phpDocumentor2/releases/latest/download/phpDocumentor.phar"
|
||||
chmod +x "$PICO_TOOLS_DIR/phpdoc"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Installing PHP_CodeSniffer..."
|
||||
if [ "$(php -r 'echo PHP_VERSION_ID;')" -ge 50400 ]; then
|
||||
PHPCS_DOWNLOAD="https://github.com/squizlabs/PHP_CodeSniffer/releases/latest/download/"
|
||||
else
|
||||
PHPCS_DOWNLOAD="https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.2/"
|
||||
fi
|
||||
|
||||
curl --location --output "$PICO_TOOLS_DIR/phpcs" \
|
||||
"$PHPCS_DOWNLOAD/phpcs.phar"
|
||||
chmod +x "$PICO_TOOLS_DIR/phpcs"
|
||||
|
||||
curl --location --output "$PICO_TOOLS_DIR/phpcbf" \
|
||||
"$PHPCS_DOWNLOAD/phpcbf.phar"
|
||||
chmod +x "$PICO_TOOLS_DIR/phpcbf"
|
||||
|
||||
echo
|
||||
|
||||
# setup composer
|
||||
|
|
|
@ -38,10 +38,6 @@
|
|||
"picocms/pico-deprecated": "PicoDeprecated's purpose is to maintain backward compatibility to older versions of Pico.",
|
||||
"picocms/composer-installer": "This Composer plugin is responsible for installing Pico plugins and themes using the Composer package manager."
|
||||
},
|
||||
"require-dev" : {
|
||||
"phpdocumentor/phpdocumentor": "^2.9",
|
||||
"squizlabs/php_codesniffer": "^2.9"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Pico": "lib/",
|
||||
|
|
Loading…
Add table
Reference in a new issue