Skip to content

Commit

Permalink
[feat][build] Print out more info for bin/pulsar version (apache#17752)
Browse files Browse the repository at this point in the history
### Motivation

The current `bin/pulsar version` script only prints out the version string. When running custom builds of Pulsar, this is sometimes not enough to know which version you have. Since the `PulsarVersion` class already has more information, I propose we print out all of its information in the same format that the broker logs the information.

Here is a sample output for this specific PR:

```shell
$ bin/pulsar version
Current version of pulsar is: 2.11.0-SNAPSHOT
Git Revision 4414e3d
Git Branch print-more-version-info
Built by Michael Marshall <[email protected]> on mmarshall-rmbp16 at 2020-01-22T09:10:15-0600
```

### Modifications

* Add more output to the `bin/pulsar version` command.

### Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

### Documentation

- [x] `doc-not-needed`
(Please explain why)

### Matching PR in forked repository

PR in forked repository: michaeljmarshall#3

(cherry picked from commit 2d2a0b8)
  • Loading branch information
michaeljmarshall committed Sep 21, 2022
1 parent 84927f7 commit 1aa6c7c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,9 @@ public static void main(String args[]) {
return;
}
System.out.println("Current version of pulsar is: " + PulsarVersion.getVersion());
System.out.println("Git Revision " + PulsarVersion.getGitSha());
System.out.println("Git Branch " + PulsarVersion.getGitBranch());
System.out.println("Built by " + PulsarVersion.getBuildUser() + " on " + PulsarVersion.getBuildHost() + " at "
+ PulsarVersion.getBuildTime());
}
}

0 comments on commit 1aa6c7c

Please sign in to comment.