You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/04/26 14:47:37 UTC

[fineract] 01/03: FINERACT-883

This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit c317db110f2886395c3919b0bb88aac683c233e4
Author: xurror <ka...@outlook.com>
AuthorDate: Tue Apr 21 16:47:34 2020 +0100

    FINERACT-883
    
    Display fineracts git build info actuator/info endpoint
---
 fineract-provider/.gitignore                       |  1 +
 fineract-provider/build.gradle                     | 30 +++++++++++++++++++---
 .../properties/basicauth/application.properties    |  1 +
 .../basicauth/twofactor/application.properties     |  1 +
 .../properties/oauth/application.properties        |  1 +
 .../oauth/twofactor/application.properties         |  1 +
 .../src/main/resources/application.properties      |  1 +
 7 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/fineract-provider/.gitignore b/fineract-provider/.gitignore
index e4bae86..0118827 100644
--- a/fineract-provider/.gitignore
+++ b/fineract-provider/.gitignore
@@ -1,6 +1,7 @@
 bin
 out/
 build
+src/main/resources/git.properties
 repos
 .classpath
 .project
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index d6982f8..746898b 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -49,6 +49,7 @@ buildscript {
       // See: https://github.com/spotbugs/spotbugs-gradle-plugin/issues/128#issuecomment-535864882
      classpath 'com.google.guava:guava:28.1-jre'
      classpath "gradle.plugin.com.github.andygoossens:gradle-modernizer-plugin:1.3.0"
+     classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.2"
   }
 }
 
@@ -68,6 +69,7 @@ apply plugin: "com.github.spotbugs"
 apply plugin: 'checkstyle'
 apply plugin: 'com.github.andygoossens.gradle-modernizer-plugin'
 apply plugin: 'jacoco'
+apply plugin: "com.gorylenko.gradle-git-properties"
 // apply plugin: 'pmd'
 
 dependencyManagement {
@@ -250,8 +252,8 @@ rat {
 
 	//BSD License
 	'**/assets/uglify.js',
-         //Ignore out folder
-         '**/out/**'
+    //Ignore out folder
+    '**/out/**',
 	]
 }
 
@@ -403,7 +405,15 @@ war {
 
 license {
     header rootProject.file('../APACHE_LICENSETEXT.md')
-    excludes(["**/*.html", "**/*.mustache", "**/package-info.java", "**/keystore.jks", "**/swagger-ui/**"])
+    excludes([
+        "**/rat-report.txt",
+        "**/git.properties",
+        "**/*.html",
+        "**/*.mustache",
+        "**/package-info.java",
+        "**/keystore.jks",
+        "**/swagger-ui/**",
+    ])
     strictCheck true
 }
 
@@ -557,6 +567,7 @@ def qualifyVersionIfNecessary(version) {
 springBoot {
     mainClassName = 'org.apache.fineract.ServerWithMariaDB4jApplication'
 }
+
 bootWar {
     mainClassName = 'org.apache.fineract.ServerWithMariaDB4jApplication'
 }
@@ -567,3 +578,16 @@ tasks.withType(SpotBugsTask) {
     reports.html.enabled = true
     reportLevel = "high"
 }
+
+gitProperties {
+    gitPropertiesResourceDir = "${project.rootDir}/src/main/resources"
+    dateFormat = "yyyy-MM-dd'T'HH:mmZ"
+    dateFormatTimeZone = "GMT"
+}
+
+generateGitProperties.outputs.upToDateWhen { false }
+
+clean {
+    delete "${project.rootDir}/src/main/resources/git.properties"
+}
+
diff --git a/fineract-provider/properties/basicauth/application.properties b/fineract-provider/properties/basicauth/application.properties
index b1f6aea..a6f6692 100644
--- a/fineract-provider/properties/basicauth/application.properties
+++ b/fineract-provider/properties/basicauth/application.properties
@@ -19,3 +19,4 @@
 
 spring.profiles.default=basicauth
 management.health.jms.enabled=false
+management.info.git.mode=FULL
diff --git a/fineract-provider/properties/basicauth/twofactor/application.properties b/fineract-provider/properties/basicauth/twofactor/application.properties
index b748491..59bd126 100644
--- a/fineract-provider/properties/basicauth/twofactor/application.properties
+++ b/fineract-provider/properties/basicauth/twofactor/application.properties
@@ -20,3 +20,4 @@
 spring.profiles.default=basicauth
 spring.profiles.active=basicauth,twofactor
 management.health.jms.enabled=false
+management.info.git.mode=FULL
diff --git a/fineract-provider/properties/oauth/application.properties b/fineract-provider/properties/oauth/application.properties
index b34050a..d958ec7 100644
--- a/fineract-provider/properties/oauth/application.properties
+++ b/fineract-provider/properties/oauth/application.properties
@@ -20,3 +20,4 @@
 spring.profiles.default=basicauth
 spring.profiles.active=oauth
 management.health.jms.enabled=false
+management.info.git.mode=FULL
diff --git a/fineract-provider/properties/oauth/twofactor/application.properties b/fineract-provider/properties/oauth/twofactor/application.properties
index 3164fff..1a2c979 100644
--- a/fineract-provider/properties/oauth/twofactor/application.properties
+++ b/fineract-provider/properties/oauth/twofactor/application.properties
@@ -20,3 +20,4 @@
 spring.profiles.default=basicauth
 spring.profiles.active=oauth,twofactor
 management.health.jms.enabled=false
+management.info.git.mode=FULL
diff --git a/fineract-provider/src/main/resources/application.properties b/fineract-provider/src/main/resources/application.properties
index b1f6aea..a6f6692 100644
--- a/fineract-provider/src/main/resources/application.properties
+++ b/fineract-provider/src/main/resources/application.properties
@@ -19,3 +19,4 @@
 
 spring.profiles.default=basicauth
 management.health.jms.enabled=false
+management.info.git.mode=FULL