updated git hooks
This commit is contained in:
@ -1,4 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SHORT_HASH=$(git rev-parse --short HEAD)
|
||||
sed -i "/^GIT_HASH=\".*\"/ s//GIT_HASH=\"${SHORT_HASH}\"/" .env
|
||||
|
||||
DIRTY_STATE=$(git diff --stat)
|
||||
if [ -n "$DIRTY_STATE" ]; then
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_TAG=true/" .env
|
||||
else
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_TAG=false/" .env
|
||||
fi
|
||||
|
||||
SHORT_HASH=$(git rev-parse --short HEAD)
|
||||
sed -i "/^GIT_HASH=\".*\"/ s//GIT_HASH=\"${SHORT_HASH}\"/" .env
|
||||
|
Reference in New Issue
Block a user