Files
colorhash/tools/gencommit.sh
Alek Ratzloff ae288b06df 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 <alekratz@gmail.com>
2024-05-31 22:26:39 -07:00

12 lines
404 B
Bash
Executable File

#!/bin/bash
set -eo pipefail
here="$(dirname "$(realpath "$0")")"
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