• git-commit-id-plugin maven插件笔记(git commitId跟踪工具)



    代码版本管理比较混乱,如何记录呢?
    一种是手动记录,也可以实现,显得有点笨。
    也可以通过插件。

    maven依赖

    <plugin>
      <groupId>pl.project13.mavengroupId>
      <artifactId>git-commit-id-pluginartifactId>
      <version>4.9.10version>
    plugin>
    
    

    在线地址(华为云仓库):
    https://repo.huaweicloud.com/repository/maven/pl/project13/maven/git-commit-id-plugin/4.9.10/

    这样打包后,解压jar包。BOOT-INF\classes 下会有个文件git.properties 记录提交信息。
    git.commit.id就是提交id。

    注:使用该工具,注意先提交再打包,这样版本才一致。

    git.properties 例子

    #Generated by Git-Commit-Id-Plugin
    git.branch=zktest
    git.build.host=a-ttt-1
    git.build.time=2024-05-30T16\:41\:00+0800
    git.build.user.email=ttt@test
    git.build.user.name=ttt
    git.build.version=0.0.1-SNAPSHOT
    git.closest.tag.commit.count=
    git.closest.tag.name=
    git.commit.author.time=2024-05-30T09\:46\:31+0800
    git.commit.committer.time=2024-05-30T09\:46\:31+0800
    git.commit.id=0b55bbbbbbbbbbbd2df32cd67
    git.commit.id.abbrev=0b558ad
    git.commit.id.describe=0b558ad-dirty
    git.commit.id.describe-short=0b558ad-dirty
    git.commit.message.full=提交信息
    git.commit.message.short=提交信息简写
    git.commit.time=2024-05-30T09\:46\:31+0800
    git.commit.user.email=ttt@test
    git.commit.user.name=ttt
    git.dirty=true
    git.local.branch.ahead=0
    git.local.branch.behind=0
    git.remote.origin.url=http\://git.51test/CRM.git
    git.tags=
    git.total.commit.count=76
    
  • 相关阅读:
    MySQL_关于JSON数据的查询
    C语言实现双向循环链表
    【C++】C++的IO流
    时序数据库选型
    Anaconda删除虚拟环境
    JAVASE 第二十二天
    vmstat 命令
    【Vue】ElementUI实现登录注册+axios全局配置+CORS跨域
    HCIE Datacom考试-MAC 地址基础及漂移技术汇总!
    业务场景功能的继续修改
  • 原文地址:https://blog.csdn.net/enthan809882/article/details/139328921