Procházet zdrojové kódy

Merge branch 'mazq-git-1214' into 'master'

git版本号插件添加

See merge request dcuc-tjdsj/coder-service!12
黄资权 před 1 rokem
rodič
revize
3d1ff59aba
1 změnil soubory, kde provedl 26 přidání a 0 odebrání
  1. 26 0
      dcuc-coder-service/pom.xml

+ 26 - 0
dcuc-coder-service/pom.xml

@@ -238,6 +238,32 @@
                             <target>8</target>
                         </configuration>
                     </plugin>
+                    <!--生成git-infos.properties 版本文件-->
+                    <plugin>
+                        <groupId>pl.project13.maven</groupId>
+                        <artifactId>git-commit-id-plugin</artifactId>
+                        <version>4.9.10</version>
+                        <executions>
+                            <execution>
+                                <id>get-the-git-infos</id>
+                                <goals>
+                                    <goal>revision</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <abbrevLength>8</abbrevLength>
+                            <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
+                            <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                            <includeOnlyProperties>
+                                <includeOnlyProperty>^git.branch</includeOnlyProperty>
+                                <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
+                                <includeOnlyProperty>^git.commit.(id|id.abbrev|message.full)*</includeOnlyProperty>
+                            </includeOnlyProperties>
+                            <generateGitPropertiesFilename>${project.build.outputDirectory}/git-infos.properties
+                            </generateGitPropertiesFilename>
+                        </configuration>
+                    </plugin>
                 </plugins>
             </build>
         </profile>