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
  • Loading branch information
tomscut committed Nov 6, 2021
1 parent d357cec commit bc8e40c
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 @@ -583,6 +583,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 bc8e40c

Please sign in to comment.