Commit 85e7d684 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Détermine les versions disponibles tout seul.

parent 5ee1b2ce
No related merge requests found
Showing with 11 additions and 8 deletions
+11 -8
variables:
PHP_VERSIONS: "7.1 7.3 7.4 8.0"
.job:
image: ${DISTRO}:${CODENAME}
tags: [docker]
......@@ -10,9 +7,9 @@ variables:
DISTRO: ${CI_JOB_NAME}
script:
- apt-get update -yqq
- apt-get install -yq php8.0-cli
- apt-get install -yq php-cli
- mkdir public
- php ./map-exts.php ${PHP_VERSIONS} > public/${DISTRO}-${CODENAME}.yml
- php ./map-exts.php > public/${DISTRO}-${CODENAME}.yml
artifacts:
name: php_packages-${DISTRO}-${CODENAME}
paths:
......
......@@ -2,12 +2,18 @@
<?php
error_reporting(-1);
$argv = $_SERVER['argv'];
array_shift($argv);
$versions = [];
exec("apt-cache search php-cli | awk '/^php[0-9]\.[0-9]-/{print $1}'", $versions, $error);
if ($error) {
die("code: $error");
}
$versions = array_map(function($v) {
return substr($v, 3, 3);
}, $versions);
echo "php_packages:";
foreach($argv as $version) {
foreach($versions as $version) {
fputs(STDERR, "\nProcessing PHP ${version}\n");
exec("apt-get install -yq php${version}-cli");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment