git-hooks/hooks/local/post-commit

5 lines
126 B
Bash

#!/usr/bin/env bash
SHORT_HASH=$(git rev-parse --short HEAD)
sed -i "/^GIT_HASH=\".*\"/ s//GIT_HASH=\"${SHORT_HASH}\"/" .env