diff options
| author | 2016-07-14 06:55:00 -0700 | |
|---|---|---|
| committer | 2016-07-14 07:07:28 -0700 | |
| commit | 4382169e60b212ef0541bcf83cc9886c6fa34a8b (patch) | |
| tree | cedd82e9fd15ede74a8efc9bd401de6b93ed9a49 /meta.pl | |
| parent | 473ba634a02c159eda2a56ad15b53a38c2024984 (diff) | |
Add a version command.
*NOTE*: Reflects the state of git only at the time the bot is started.
Version is not updated in any way at runtime.
First field is the newest commit that exists both locally and on GitLab.
Second field is the output of `git describe --all --long --dirty`.
Third field is the latest commit locally.
Diffstat (limited to 'meta.pl')
| -rwxr-xr-x | meta.pl | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -47,6 +47,7 @@ $::pacealerts = 1; $::settingschanged = 0; %::wordlist = (); %::httpRequests = (); +$::version = ''; ## debug variables. 0 to turn off debugging, else set it to a Term::ANSIColor constant. %::debugx = ( @@ -97,6 +98,11 @@ alarm 300; sub init { my ( $conn, $host ); + $::version .= `git merge-base remotes/origin/master HEAD`; chomp $::version; + $::version .= ' '; + $::version .= `git describe --long --all --dirty`; chomp $::version; + $::version .= ' '; + $::version .= `git rev-parse HEAD`; chomp $::version; my $irc = new Net::IRC; GetOptions( 'debug|d!' => \$::debug, 'pass|p=s' => \$::pass, |
