Improve ext-phalcon linux script and readme

This commit is contained in:
Shivam Mathur 2019-12-31 13:25:59 +05:30
parent 0c9f8a8e7e
commit 6c6203b683
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 19 additions and 19 deletions

View File

@ -70,11 +70,11 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
## :wrench: Tools Support ## :wrench: Tools Support
The latest version of the following tools can be setup globally using the `tools` input The latest version of the following tools can be setup globally using the `tools` input.
`composer`, `codeception`, `deployer`, `pecl`, `phinx`, `phpcbf`, `phpcpd`, `php-cs-fixer`, `phpcs`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm` `composer`, `codeception`, `deployer`, `pecl`, `phinx`, `phpcbf`, `phpcpd`, `php-cs-fixer`, `phpcs`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`
```yml ```yaml
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.4' php-version: '7.4'
@ -236,7 +236,7 @@ You can persist composer's internal cache directory using the [`action/cache`](h
In the above example, if you support a range of `composer` dependencies and do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache. In the above example, if you support a range of `composer` dependencies and do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
```yml ```yaml
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
``` ```

View File

@ -1,15 +1,15 @@
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g") ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-fast update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1 find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-fast update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1
curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-psr sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-psr
if [ ! "$(apt-cache search php"$2"-psr)" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev
for tool in php-config phpize; do for tool in php-config phpize; do
if [ -e "/usr/bin/$tool$2" ]; then if [ -e "/usr/bin/$tool$2" ]; then
sudo update-alternatives --set $tool /usr/bin/"$tool$2" sudo update-alternatives --set $tool /usr/bin/"$tool$2"
fi fi
done done
if [ ! "$(apt-cache search php"$2"-psr)" ]; then
cd ~ && git clone --depth=1 https://github.com/jbboehr/php-psr.git cd ~ && git clone --depth=1 https://github.com/jbboehr/php-psr.git
cd php-psr && sudo /usr/bin/phpize"$2" cd php-psr && sudo /usr/bin/phpize"$2"
./configure --with-php-config=/usr/bin/php-config"$2" ./configure --with-php-config=/usr/bin/php-config"$2"