Woodpecker CI: Lint workflow, don't use brackets in shell tests

This commit is contained in:
Phantasm 2026-02-14 20:44:28 +01:00 committed by Phantasm
commit cdcc432f31

View file

@ -29,7 +29,7 @@ steps:
- su testuser -c "HOME=/home/testuser mix local.rebar --force"
- su testuser -c "HOME=/home/testuser mix deps.get"
- |
if [ ! su testuser -c "HOME=/home/testuser mix analyze" && ! -f fail.stamp ]; then
if ! su testuser -c "HOME=/home/testuser mix analyze" && ! test -f fail.stamp; then
touch fail.stamp
fi
@ -38,14 +38,14 @@ steps:
failure: ignore
commands:
- |
if [ ! mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}' && -f fail.stamp ]; then
touch fail.stamp
if ! mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}' && test -f fail.stamp; then
touch fail.stamp
fi
ensure-status:
image: *elixir-image
commands: |
if [ -f fail.stamp ]; then
if test -f fail.stamp; then
echo "One or more previous steps fails. Failing workflow..."
exit 1
else