Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: