Build script: replace 'git' with branch name, add 'r' for revision number.