ci: fix pre-commit scripts compatibility with posix shells (#4243)
Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>pull/4335/head
parent
606875ea39
commit
548bdce8ba
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ ! -z "$NO_HOOK" ]]
|
if [ -n "$NO_HOOK" ]; then
|
||||||
then
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,4 +8,4 @@ fi
|
||||||
. "$(dirname "$0")/required-apps"
|
. "$(dirname "$0")/required-apps"
|
||||||
|
|
||||||
golangci-lint run -v --fix && \
|
golangci-lint run -v --fix && \
|
||||||
cd web && ${PMGR} lint
|
cd web && "${PMGR}" lint
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PMGR=pnpm
|
export PMGR=pnpm
|
||||||
|
|
||||||
if [[ ! -x "$(command -v golangci-lint)" ]]; then
|
if [ ! -x "$(command -v golangci-lint)" ]; then
|
||||||
echo "You must install golangci-lint."
|
echo "You must install golangci-lint."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -x "$(command -v pnpm)" ]]; then
|
if [ ! -x "$(command -v pnpm)" ]; then
|
||||||
PMGR=yarn
|
export PMGR=yarn
|
||||||
if [[ ! -x "$(command -v yarn)" ]]; then
|
if [ ! -x "$(command -v yarn)" ]; then
|
||||||
PMGR=npm
|
export PMGR=npm
|
||||||
if [[ ! -x "$(command -v npm)" ]]; then
|
if [ ! -x "$(command -v npm)" ]; then
|
||||||
echo "You must install a node package manager."
|
echo "You must install a node package manager."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue