fixing git hook scripts

This commit is contained in:
2022-07-19 14:07:50 -06:00
parent 46b6cb678e
commit 3e42869bbb
4 changed files with 45 additions and 9 deletions

View File

@ -5,9 +5,9 @@ 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
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=true/" .env
else
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_TAG=false/" .env
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=false/" .env
fi
GIT_TAG=$(git tag --points-at HEAD)