mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Refactor PHP packages to a config
This commit is contained in:
parent
45a631dbaf
commit
e6e79e1717
6
src/configs/php_packages
Normal file
6
src/configs/php_packages
Normal file
@ -0,0 +1,6 @@
|
||||
cli
|
||||
curl
|
||||
dev
|
||||
intl
|
||||
mbstring
|
||||
xml
|
@ -128,7 +128,7 @@ switch_version() {
|
||||
add_packaged_php() {
|
||||
if [ "$runner" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then
|
||||
add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
|
||||
IFS=' ' read -r -a packages <<<"$(echo "cli curl dev mbstring xml intl" | sed "s/[^ ]*/php$version-&/g")"
|
||||
IFS=' ' read -r -a packages <<<"$(sed "s/[^ ]*/php$version-&/g" "$dist"/../src/configs/php_packages | tr '\n' ' ')"
|
||||
install_packages "${packages[@]}"
|
||||
else
|
||||
run_script "php-ubuntu" "$version"
|
||||
|
Loading…
Reference in New Issue
Block a user