mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
don't create spreed integration test dirs when spreed doesn't exist
fixes #43
This commit is contained in:
parent
f4cbaf218d
commit
6242ca41fe
1 changed files with 24 additions and 14 deletions
|
|
@ -23,26 +23,36 @@ shadow-setup
|
|||
echo $"Running as ($HAZE_UID):($HAZE_GID)"
|
||||
|
||||
let dirs = [
|
||||
"/var/www/html/data"
|
||||
"/var/www/html/config"
|
||||
"/var/www/html/build/integration/vendor",
|
||||
"/var/www/html/build/integration/output",
|
||||
"/var/www/html/build/integration/work",
|
||||
"/var/www/html/apps/spreed",
|
||||
"/var/www/html/apps/spreed/tests",
|
||||
"/var/www/html/apps/spreed/tests/integration",
|
||||
"/var/www/html/apps/spreed/tests/integration/vendor",
|
||||
"/var/www/html/apps/spreed/tests/integration/vendor/composer",
|
||||
["condition", "path"];
|
||||
["/", "/var/www/html/data"],
|
||||
["/", "/var/www/html/config"],
|
||||
["/", "/var/www/html/build/integration/vendor"],
|
||||
["/", "/var/www/html/build/integration/output"],
|
||||
["/", "/var/www/html/build/integration/work"],
|
||||
["/var/www/html/apps/spreed", "/var/www/html/apps/spreed/tests/integration/vendor/composer"],
|
||||
];
|
||||
|
||||
let files = [
|
||||
"/var/www/html/build/integration/composer.lock",
|
||||
["condition", "path"];
|
||||
["/", "/var/www/html/build/integration/composer.lock"],
|
||||
]
|
||||
|
||||
$dirs | each { |dir| mkdir $dir }
|
||||
$files | each { |file| touch $file }
|
||||
$dirs | each { |dir|
|
||||
if ($dir.condition | path exists) {
|
||||
mkdir $dir.path
|
||||
}
|
||||
}
|
||||
$files | each { |file|
|
||||
if ($file.condition | path exists) {
|
||||
touch $file.path
|
||||
}
|
||||
}
|
||||
|
||||
$dirs | append $files | each { |path| chown -R $"($HAZE_UID):($HAZE_GID)" $path }
|
||||
$dirs | append $files | each { |item|
|
||||
if ($item.path | path exists) {
|
||||
chown -R $"($HAZE_UID):($HAZE_GID)" $item.path
|
||||
}
|
||||
}
|
||||
|
||||
echo "{}\n" | save -f /var/www/html/build/integration/composer.lock
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue