Merge pull request #2448 from docker-mailserver/macos-linting-support

macos support: lint.sh doesn't find proper bash under /usr/local/bin + acme_extract (python) is trying to be shellchecked
This commit is contained in:
Nathan Pierce 2022-03-02 17:34:27 -05:00 committed by GitHub
commit 1eca829cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
#! /bin/bash #! /usr/bin/env bash
# version v0.2.0 unstable # version v0.2.0 unstable
# executed by Make during CI or manually # executed by Make during CI or manually
@ -105,7 +105,7 @@ function _shellcheck
-not -path './target/docker-configomat/*' -not -path './target/docker-configomat/*'
)" )"
# macOS lacks parity for `-executable` but presently produces the same results: https://stackoverflow.com/a/4458361 # macOS lacks parity for `-executable` but presently produces the same results: https://stackoverflow.com/a/4458361
[[ "$(uname)" == "Darwin" ]] && FIND_EXEC="-perm +111 -type l -or" || FIND_EXEC="-executable" [[ "$(uname)" == "Darwin" ]] && FIND_EXEC="-perm -711" || FIND_EXEC="-executable"
# shellcheck disable=SC2248 # shellcheck disable=SC2248
F_BIN="$(find 'target/bin' ${FIND_EXEC} -type f)" F_BIN="$(find 'target/bin' ${FIND_EXEC} -type f)"
F_BATS="$(find 'test' -maxdepth 1 -type f -iname '*.bats')" F_BATS="$(find 'test' -maxdepth 1 -type f -iname '*.bats')"