From 39a2d6a53335cd940cfb4b360c6c3f80fc590db6 Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Wed, 18 Sep 2024 12:05:29 -0300 Subject: [PATCH] chore(githooks): add pre-commit script for running adorno (lint+test+report) --- githooks/pre-commit-adorno | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 githooks/pre-commit-adorno diff --git a/githooks/pre-commit-adorno b/githooks/pre-commit-adorno new file mode 100644 index 0000000..6fa97af --- /dev/null +++ b/githooks/pre-commit-adorno @@ -0,0 +1,21 @@ +#!/bin/bash + +foundryup + +if [ $? -ne 0 ]; then + echo "foundryup failed." + exit 1 +fi + +pnpm run adorno + +if [ $? -ne 0 ]; then + echo "pnpm run adorno failed." + exit 1 +fi + +git add . + +echo "Successfully ran pnpm run adorno and added modified files." + +exit 0 \ No newline at end of file