Skip to content

Commit

Permalink
[pulsar-broker] Add git branch information for PulsarVersion (#12541)
Browse files Browse the repository at this point in the history
(cherry picked from commit bc8e40c)
  • Loading branch information
tomscut authored and codelipenghui committed Dec 20, 2021
1 parent 5e7f9cd commit 1aa80b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ public void start() throws PulsarServerException {
LOG.info("Starting Pulsar Broker service; version: '{}'",
(brokerVersion != null ? brokerVersion : "unknown"));
LOG.info("Git Revision {}", PulsarVersion.getGitSha());
LOG.info("Git Branch {}", PulsarVersion.getGitBranch());
LOG.info("Built by {} on {} at {}",
PulsarVersion.getBuildUser(),
PulsarVersion.getBuildHost(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public static String getGitSha() {
}
}

public static String getGitBranch() {
return "${git.branch}";
}

public static String getBuildUser() {
String email = "${git.build.user.email}";
String name = "${git.build.user.name}";
Expand Down

0 comments on commit 1aa80b7

Please sign in to comment.