From ae288b06df4a460c37c836e270f9edaabffb7d6d Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Fri, 31 May 2024 22:26:39 -0700 Subject: [PATCH] Add `git add` and ANSI output to gencommit.sh Usually you want to `git add` when you run gencommit.sh, so that has been added. Also, add ANSI output because I like to see what we're generating while in the terminal. Signed-off-by: Alek Ratzloff --- examples/commithash.svg | 80 ++++++++++++++++++++--------------------- tools/gencommit.sh | 3 ++ 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/examples/commithash.svg b/examples/commithash.svg index c86f5b4..65bc5d4 100644 --- a/examples/commithash.svg +++ b/examples/commithash.svg @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/gencommit.sh b/tools/gencommit.sh index 8603796..552ebc3 100755 --- a/tools/gencommit.sh +++ b/tools/gencommit.sh @@ -5,4 +5,7 @@ cd "$here/.." echo "Generating examples/commithash.svg" python3 -m colorhash "$(git rev-parse HEAD)" --input-type hash --hash sha1 --output-type svg --out examples/commithash.svg +git add examples/commithash.svg +# Also print the ANSI version to the command line +python3 -m colorhash "$(git rev-parse HEAD)" --input-type hash --hash sha1