Add git describe to VERSION when running from a git clone
This commit is contained in:
parent
d4edf3acc6
commit
6b6581fbf5
2
Changes
2
Changes
@ -5,6 +5,8 @@
|
||||
|
||||
Add connection_time plugin
|
||||
|
||||
Add git information to version number when running from a git clone
|
||||
|
||||
Add rcpt_regexp plugin (Hanno Hecker)
|
||||
|
||||
Add notes method to Qpsmtpd::Address objects (Jared Johnson)
|
||||
|
@ -9,6 +9,14 @@ use Qpsmtpd::Constants;
|
||||
|
||||
$VERSION = "0.80";
|
||||
|
||||
my $git;
|
||||
|
||||
if (-e ".git") {
|
||||
local $ENV{PATH} = "/usr/bin:/usr/local/bin:/opt/local/bin/";
|
||||
$git = `git describe`;
|
||||
$git && chomp $git;
|
||||
}
|
||||
|
||||
my $hooks = {};
|
||||
my %defaults = (
|
||||
me => hostname,
|
||||
@ -41,7 +49,7 @@ sub DESTROY {
|
||||
#warn $_ for DashProfiler->profile_as_text("qpsmtpd");
|
||||
}
|
||||
|
||||
sub version { $VERSION };
|
||||
sub version { $VERSION . ($git ? "/$git" : "") };
|
||||
|
||||
sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user