updated git hooks
This commit is contained in:
parent
0908b601ce
commit
938e1f8c96
@ -1,5 +1,15 @@
|
||||
#!/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
|
||||
|
||||
GIT_TAG=$(git tag --points-at HEAD)
|
||||
if [ -n "$GIT_TAG" ]; then
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"${GIT_TAG}\"/" .env
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
GIT_TAG=$(git tag --points-at HEAD)
|
||||
if [ -n "$GIT_TAG" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user