mirror of
https://codeberg.org/icewind/haze.git
synced 2026-08-02 12:14:46 +02:00
make it easier to use a specific phpunit version
This commit is contained in:
parent
44da124f75
commit
d59b99211a
5 changed files with 27 additions and 12 deletions
|
|
@ -85,28 +85,28 @@
|
|||
name = "phpunit";
|
||||
runtimeInputs = [jq];
|
||||
text = ''
|
||||
MAJOR=$(jq -r 'first(.require."phpunit/phpunit" | scan("[[:digit:]]+"))' vendor-bin/phpunit/composer.json)
|
||||
MAJOR=$(jq -r 'first(.require."phpunit/phpunit" | scan("[[:digit:]]+"))' vendor-bin/phpunit/composer.json || echo "")
|
||||
case "$MAJOR" in
|
||||
9)
|
||||
PKG=${phpunitUnwrapped "9"}
|
||||
BIN="${getExe (phpunitUnwrapped "9")}"
|
||||
;;
|
||||
10)
|
||||
PKG=${phpunitUnwrapped "10"}
|
||||
BIN="${getExe (phpunitUnwrapped "10")}"
|
||||
;;
|
||||
11)
|
||||
PKG=${phpunitUnwrapped "11"}
|
||||
BIN="${getExe (phpunitUnwrapped "11")}"
|
||||
;;
|
||||
12)
|
||||
PKG=${phpunitUnwrapped "12"}
|
||||
BIN="${getExe (phpunitUnwrapped "12")}"
|
||||
;;
|
||||
13)
|
||||
PKG=${phpunitUnwrapped "13"}
|
||||
BIN="${getExe (phpunitUnwrapped "13")}"
|
||||
;;
|
||||
*)
|
||||
PKG=${phpunitUnwrapped "10"}
|
||||
BIN="${getExe (phpunitUnwrapped "10")}"
|
||||
;;
|
||||
esac
|
||||
"$PKG"/bin/phpunit "$@"
|
||||
"$BIN" "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -160,6 +160,7 @@
|
|||
phpEnv.packages.composer
|
||||
phpunit
|
||||
]
|
||||
++ (map phpunitUnwrapped ["9" "10" "11" "12" "13"])
|
||||
++ optionals ((compareVersions phpVersion "8.2") == 1) [
|
||||
(frankenphp.override {
|
||||
php = php.withExtensions (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue