ci: fix npm run (#4849)
parent
8acc1053ed
commit
74e5272f33
|
@ -11,6 +11,10 @@ insert_final_newline = true
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[{.github/pre-commit,.github/required-apps,.github/commit-msg}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[.buildkite/hooks/**]
|
[.buildkite/hooks/**]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
. "$(dirname "$0")/required-apps"
|
. "$(dirname "$0")/required-apps"
|
||||||
|
|
||||||
cd web && ${PMGR} commitlint --edit "$1"
|
cd web && ${PMGR_EXEC} commitlint --edit "$1"
|
||||||
|
|
|
@ -8,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_RUN} lint
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
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
|
||||||
export PMGR=yarn
|
export PMGR_RUN="pnpm"
|
||||||
if [ ! -x "$(command -v yarn)" ]; then
|
export PMGR_EXEC="pnpm"
|
||||||
export PMGR=npm
|
elif [ -x "$(command -v yarn)" ]; then
|
||||||
if [ ! -x "$(command -v npm)" ]; then
|
export PMGR_RUN="yarn run"
|
||||||
echo "You must install a node package manager."
|
export PMGR_EXEC="yarn dlx"
|
||||||
|
elif [ -x "$(command -v npm)" ]; then
|
||||||
|
export PMGR_RUN="npm run"
|
||||||
|
export PMGR_EXEC="npx"
|
||||||
|
else
|
||||||
|
echo "You must install a node package manager (pnpm, yarn, or npm)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue