1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00
haze/nix/image/scripts/integration

22 lines
723 B
Text
Executable file

#!/bin/nu
def --wrapped main [feature: path, ...rest] {
mut feature = $feature;
mut workdir = $"($env.WEBROOT)/build/integration"
if ($feature | str starts-with "apps/") {
let parts = $feature | split row '/'
occ app:enable $parts.1
let parts = $feature | split row -n 2 '/features/'
$workdir = $parts.0
$feature = $"features/($parts.1)"
} else if ($feature | str starts-with "build/integration/") {
$feature = $feature | str replace "build/integration/" ""
}
# don't use the proxy urls for generated urls
occ config:system:delete overwritehost
occ config:system:delete overwriteprotocol
cd $workdir
bash run.sh $feature ...$rest
}