#!/bin/sh set -e head=`git rev-parse HEAD` branch=`git rev-parse --abbrev-ref HEAD` date=`date` echo "// auto generated by version.sh script" > src/cli/version.rs echo "pub const GIT_VERSION: &str = \"$head\";" >> src/cli/version.rs echo "pub const GIT_BRANCH: &str = \"$branch\";" >> src/cli/version.rs echo "pub const BUILD_TIME: &str = \"$date\";" >> src/cli/version.rs