mirror of
https://github.com/justLV/onju-v2
synced 2026-04-21 15:47:55 +00:00
12 lines
344 B
Bash
12 lines
344 B
Bash
#!/bin/sh
|
|
|
|
if [ ! -f .git/hooks/post-commit ]; then
|
|
cp setup-git-hash.sh .git/hooks/post-commit
|
|
chmod +x .git/hooks/post-commit
|
|
echo "Setup, will automatically update git hash post commit"
|
|
fi
|
|
|
|
git_hash=$(git rev-parse --short HEAD)
|
|
|
|
echo "#define GIT_HASH \"${git_hash}\"" > onjuino/git_hash.h
|
|
echo "🚀 Updated git hash to ${git_hash}"
|