feat: version banner UI + GET /api/v1/version backend endpoint
This commit is contained in:
@@ -109,9 +109,54 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Resolves git.commit.id.abbrev / git.branch / git.tags из локального .git
|
||||
directory. Properties доступны для других plugin'ов в той же phase'е.
|
||||
CI без .git folder → плагин fallback'ит к "Unknown", это OK. -->
|
||||
<plugin>
|
||||
<groupId>io.github.git-commit-id</groupId>
|
||||
<artifactId>git-commit-id-maven-plugin</artifactId>
|
||||
<version>9.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>git-info</id>
|
||||
<goals><goal>revision</goal></goals>
|
||||
<phase>validate</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<failOnNoGitDirectory>false</failOnNoGitDirectory>
|
||||
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
|
||||
<skipPoms>false</skipPoms>
|
||||
<generateGitPropertiesFile>false</generateGitPropertiesFile>
|
||||
<includeOnlyProperties>
|
||||
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
|
||||
<includeOnlyProperty>^git.branch$</includeOnlyProperty>
|
||||
<includeOnlyProperty>^git.tags$</includeOnlyProperty>
|
||||
<includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
|
||||
</includeOnlyProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Генерирует META-INF/build-info.properties → Spring Boot создаёт
|
||||
BuildProperties bean → VersionController экспонирует /api/v1/version
|
||||
для UI update banner. См. ordinis-rest-api/.../web/VersionController.
|
||||
git.* properties resolved выше через git-commit-id-maven-plugin. -->
|
||||
<execution>
|
||||
<id>build-info</id>
|
||||
<goals><goal>build-info</goal></goals>
|
||||
<configuration>
|
||||
<additionalProperties>
|
||||
<commit>${git.commit.id.abbrev}</commit>
|
||||
<branch>${git.branch}</branch>
|
||||
<tag>${git.tags}</tag>
|
||||
<gitTime>${git.commit.time}</gitTime>
|
||||
</additionalProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
Reference in New Issue
Block a user