Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

新增 git-commit-id-plugin 插件 #274

Closed
venusdrogon opened this issue Mar 8, 2019 · 0 comments
Closed

新增 git-commit-id-plugin 插件 #274

venusdrogon opened this issue Mar 8, 2019 · 0 comments
Assignees
Milestone

Comments

@venusdrogon
Copy link
Owner

	<!-- https://github.com/git-commit-id/maven-git-commit-id-plugin -->
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>${v.git-commit-id-plugin}</version>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- 使properties扩展到整个maven bulid 周期 Ref: https://github.com/ktoso/maven-git-commit-id-plugin/issues/280 -->
					<injectAllReactorProjects>true</injectAllReactorProjects>
					<dateFormat>yyyy.MM.dd HH:mm:ss</dateFormat>
					<verbose>true</verbose>
					<!-- 是否生 git.properties 属性文件 -->
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<!--git描述配置,可选;由JGit提供实现; -->
					<gitDescribe>
						<!--是否生成描述属性 -->
						<skip>false</skip>
						<!--提交操作未发现tag时,仅打印提交操作ID, -->
						<always>false</always>
						<!--提交操作ID显式字符长度,最大值为:40;默认值:7; 0代表特殊意义;后面有解释; -->
						<abbrev>7</abbrev>
						<!--构建触发时,代码有修改时(即"dirty state"),添加指定后缀;默认值:""; -->
						<dirty>-dirty</dirty>
						<forceLongFormat>false</forceLongFormat>
					</gitDescribe>
				</configuration>
			</plugin>

可以生成


#Generated by Git-Commit-Id-Plugin
#Fri Mar 08 23:25:16 CST 2019
git.build.user.email=venusdrogon@163.com
git.build.host=feilongdeMacBook-Pro.local
git.dirty=true
git.remote.origin.url=https\://github.com/venusdrogon/feilong-core
git.closest.tag.name=1.2.0
git.commit.id.describe-short=1.2.0-1741
git.commit.user.email=venusdrogon@163.com
git.commit.time=2019.01.31 00\:25\:53
git.commit.message.full=\:bookmark\:upgrade-version-1.13.1-SNAPSHOT
git.build.version=1.13.1-SNAPSHOT
git.commit.message.short=\:bookmark\:upgrade-version-1.13.1-SNAPSHOT
git.commit.id.abbrev=9a43730
git.branch=master
git.build.user.name=feilong
git.closest.tag.commit.count=1741
git.commit.id.describe=1.2.0-1741-g9a43730
git.commit.id=9a437302470dd6e01894244ef1edb8700266a32c
git.tags=
git.build.time=2019.03.08 23\:25\:16
git.commit.user.name=feilong



@venusdrogon venusdrogon self-assigned this Mar 8, 2019
@venusdrogon venusdrogon added this to the 1.13.1 milestone Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant