3 ms·
Nice and clean solution. I usually write the version string of a program with a git pre-commit hook. Like this: HASH="$(git rev-parse --short HEAD)" s
by andmarios 11y ago
Nice and clean solution. I usually write the version string of a program with a git pre-commit hook.
Like this:
HASH="$(git rev-parse --short HEAD)"
sed 's/Version = .*/Version = "'"$HASH"'+"/' -i version.go
git add version.go