From 4335bb0161c0c9a7c6411883e4826dda8fbd7f39 Mon Sep 17 00:00:00 2001 From: ga-reth Date: Tue, 3 Dec 2024 10:41:32 -0500 Subject: [PATCH] remove githook logic and troubleshooting for commit sign --- .pre-commit/run_sdk_checks.sh | 9 ++------- README.md | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.pre-commit/run_sdk_checks.sh b/.pre-commit/run_sdk_checks.sh index 98d098f7b..4cdea4f07 100755 --- a/.pre-commit/run_sdk_checks.sh +++ b/.pre-commit/run_sdk_checks.sh @@ -6,13 +6,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # nav to sdk dir SDK_DIR="$SCRIPT_DIR/../sdk" -# when running pre-commit, files are passed as args -# when running git hook, find ourselves -if [ $# -eq 0 ]; then - TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep "^sdk.*\.\(ts\|tsx\)$" || true) -else - TS_FILES="$@" -fi +# get changed TS files +TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep "^sdk.*\.\(ts\|tsx\)$" || true) if [ -n "$TS_FILES" ]; then echo "Running SDK checks..." diff --git a/README.md b/README.md index 0e469dac9..e9e107d0c 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Follow these steps to set up a functional development environment: 2a. [Create a PGP key pair](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) 2b. [Add the public key to Github](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). 2c. [Enabled commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) + 2d. [Troubleshoot any issues](https://gist.github.com/paolocarrasco/18ca8fe6e63490ae1be23e84a7039374) 3. Run `make setup` to initialize your dev environment. See `Makefile` for details. ## Security