Skip to content

Commit

Permalink
Add support for PHP dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerhot committed Apr 15, 2021
1 parent aaf5575 commit 5d0b768
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ more languages' examples you can find [here](https://github.com/gitx-io/GitFx/tr
| Ruby |`Gemfile` |`.ruby-version` [rvm](https://rvm.io/)/[rbenv](https://github.com/rbenv/rbenv) | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.rb) |
| Node.js |`package.json` |`.nvmrc` [nvm](https://github.com/nvm-sh/nvm) | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.js) |
| Perl |`cpanfile` |`.perl-version` [plenv](https://github.com/tokuhirom/plenv) | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.pl) |
| PHP | ⬜️ |`.phpenv-version` [phpenv](https://github.com/phpenv/phpenv) | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.php) |
| PHP | `composer.json` |`.phpenv-version` [phpenv](https://github.com/phpenv/phpenv) | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.php) |
| Golang | ⬜️ | ⬜️ | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.go) |
| Haskell | ⬜️ | ⬜️ | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.hs) |
| Elixir | ⬜️ | ⬜️ | [See](https://github.com/gitx-io/GitFx/blob/master/test/func_examples/function.exs) |
Expand Down
7 changes: 5 additions & 2 deletions gitfx/run_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
}

DOCKER_IMAGES = {
'php': 'composer',
}


Expand All @@ -60,7 +59,11 @@ def run_fun(func_path, func):
'ruby': '[ -f Gemfile ] && bundle install >/dev/null 2>&1',
'python': '[ -f requirements.txt ] && pip install -r requirements.txt >/dev/null 2>&1',
'node': '[ -f package.json ] && npm install --only=prod >/dev/null 2>&1',
'perl': '[ -f cpanfile ] && cpanm --installdeps . >/dev/null 2>&1'}
'perl': '[ -f cpanfile ] && cpanm --installdeps . >/dev/null 2>&1',
'php': '[ -f composer.json ] && \
curl -sS https://getcomposer.org/installer -o composer-setup.php && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 && \
php composer.phar install >/dev/null 2>&1'}

# decide language version
version = lang_version.get_version(func_lang) or 'latest'
Expand Down

0 comments on commit 5d0b768

Please sign in to comment.