提交 89af0808 编写于 作者: J Jiangtao Hu 提交者: Dong Li

script: add branch info into meta file. (#5307)

上级 b61e8ed4
......@@ -285,6 +285,7 @@ function release() {
# release info
META="${APOLLO_RELEASE_DIR}/meta.ini"
echo "git_commit: $(get_revision)" >> $META
echo "git_branch: $(get_branch)" >> $META
echo "car_type: LINCOLN.MKZ" >> $META
echo "arch: ${MACHINE_ARCH}" >> $META
}
......@@ -443,6 +444,17 @@ function get_revision() {
echo "$REVISION"
}
function get_branch() {
git branch &> /dev/null
if [ $? = 0 ];then
BRANCH=$(git rev-parse --abbrev-ref HEAD)
else
warning "Could not get the branch name, maybe this is not a git work tree." >&2
BRANCH="unknown"
fi
echo "$BRANCH"
}
function build_velodyne() {
CURRENT_PATH=$(pwd)
if [ -d "${ROS_ROOT}" ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册