如何进行DevOps中的git日志信息解读
这篇文章给大家介绍如何进行DevOps中的git日志信息解读,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
DevOps之git日志信息解读
1 版本信息
echo "解读commit数据进行镜像版本指定"$current_git_branch_latest_id=`git rev-parse HEAD`$current_git_branch_latest_short_id=`git rev-parse --short HEAD`$echo current git branch latest commit id=$current_git_branch_latest_id$echo current git branch latest commit short $id=$current_git_branch_latest_short_id# 提交的commit信息$echo $id
2 提交作者
$author=`git log --pretty=format:“%an” $current_git_branch_latest_id -1`$echo $author
3 提交时间
$date=`git log --pretty=format:“%cd” $current_git_branch_latest_id -1`$echo $date
4 提交message
$message=`git log --pretty=format:“%s” $current_git_branch_latest_id -1`$echo $message
5 完整信息
$current_git_branch_latest_id=`git rev-parse HEAD`$current_git_branch_latest_short_id=`git rev-parse --short HEAD`$echo current git branch latest commit id=$current_git_branch_latest_id$echo current git branch latest commit short $id=$current_git_branch_latest_short_id
版本解析的问题,对于CI/CD系统建设具有十分重要的作用,研制Devops开发流程,实现代码的中间操作,完成对于代码的定制,具有十分重要的作用。
关于如何进行DevOps中的git日志信息解读就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。