29 lines
680 B
Bash
Executable File
29 lines
680 B
Bash
Executable File
#!/usr/bin/env sh
|
|
# shellcheck disable=SC1091
|
|
set -e
|
|
|
|
# shellcheck disable=SC1090
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
yarn lint-staged
|
|
|
|
check_dependencies_available() {
|
|
echo "🔍 looking for additional linter dependencies"
|
|
for i in "${@}"
|
|
do
|
|
if ! command -v "${i}"; then
|
|
echo "No ${i} executable found skipping additional checks" >&2
|
|
exit 0
|
|
fi
|
|
done
|
|
echo "✅ All additional dependencies found"
|
|
}
|
|
|
|
# shellcheck disable=SC2086
|
|
check_dependencies_available pre-commit hadolint helm shellcheck circleci ggshield
|
|
|
|
echo "🍵 Updating JSON schema for Helm chart"
|
|
yarn helm:jsonschema:generate
|
|
|
|
echo "▶️ Running pre-commit hooks"
|
|
pre-commit run --all-files
|