mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 20:03:10 -06:00
bash is weird
This commit is contained in:
parent
5d69fe9fbd
commit
dfbcf927f5
|
|
@ -31,12 +31,12 @@ go get github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
|
|
||||||
# Run linting
|
# Run linting
|
||||||
echo "Looking for lint..."
|
echo "Looking for lint..."
|
||||||
# If we're running in CI, a linting fail should fail the CI step
|
# If we're running locally, continue the script even if linting fails
|
||||||
if [ -n "${CI}" ]; then
|
if [ -z ${CI+x} ]; then
|
||||||
golangci-lint run $args
|
|
||||||
else
|
|
||||||
# Otherwise continue the script even if linting fails
|
|
||||||
golangci-lint run $args || echo "Linting script failed, removing module backups"
|
golangci-lint run $args || echo "Linting script failed, removing module backups"
|
||||||
|
else
|
||||||
|
# Otherwise, a linting fail should fail the CI step
|
||||||
|
golangci-lint run $args
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore go.{mod,sum}
|
# Restore go.{mod,sum}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue