aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-server/build.gradle10
-rw-r--r--server/sonar-server/src/main/resources/build.properties3
2 files changed, 11 insertions, 2 deletions
diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle
index c88c09d48b3..7d56f441169 100644
--- a/server/sonar-server/build.gradle
+++ b/server/sonar-server/build.gradle
@@ -12,6 +12,16 @@ sourceSets {
}
}
+
+import org.apache.tools.ant.filters.ReplaceTokens
+processResources {
+ filesMatching('build.properties') {
+ filter ReplaceTokens, tokens: [
+ 'buildNumber': release ? 'git rev-parse HEAD'.execute().text.trim() : 'N/A'
+ ]
+ }
+}
+
dependencies {
// please keep the list grouped by configuration and ordered by name
diff --git a/server/sonar-server/src/main/resources/build.properties b/server/sonar-server/src/main/resources/build.properties
index 8c9958a7711..c73bb2bc3ae 100644
--- a/server/sonar-server/src/main/resources/build.properties
+++ b/server/sonar-server/src/main/resources/build.properties
@@ -1,2 +1 @@
-Implementation-Build=${buildNumber}
-Build-Time=${timestamp} \ No newline at end of file
+Implementation-Build=@buildNumber@ \ No newline at end of file