From f7b5428c60d0263a91a3f3f71a5357c5dae8b4b7 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Sat, 26 Feb 2011 23:11:37 -0700 Subject: [PATCH] Auto::GR renamed to $Auto::VERGITREV. --- bin/auto | 5 ++++- doc/CHANGELOG | 1 + lib/Core/IRC.pm | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/auto b/bin/auto index 46d92b1..ad9c7b7 100755 --- a/bin/auto +++ b/bin/auto @@ -21,6 +21,10 @@ our $Bin = $Bin; ## no critic qw(NamingConventions::Capitalization Variables::Pr BEGIN { unshift @INC, "$Bin/../lib"; + open my $gitfh, '<', "$Bin/../.git/refs/heads/indev"; + our $VERGITREV = substr readline $gitfh, 0, 7; + close $gitfh; + # Set version information. use constant { ## no critic qw(ValuesAndExpressions::ProhibitConstantPragma) NAME => 'Auto IRC Bot', @@ -28,7 +32,6 @@ BEGIN { SVER => 0, REV => 0, RSTAGE => 'd', - GR => substr `cat $Bin/../.git/refs/heads/indev`, 0, 7 }; } use Lib::Auto; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 356d836..e553c78 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Auto::GR renamed to $Auto::VERGITREV. * Bumped minimum version for API to 3.0.0a6. * Changed on_topic args to: full source hashref, new topic array * on_topic is now triggered for any topic change, regardless of source. diff --git a/lib/Core/IRC.pm b/lib/Core/IRC.pm index e07a3b6..9e05160 100644 --- a/lib/Core/IRC.pm +++ b/lib/Core/IRC.pm @@ -19,7 +19,7 @@ hook_add("on_uprivmsg", "ctcp_version_reply", sub { notice($src->{svr}, $src->{nick}, "\001VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME."\001"); } else { - notice($src->{svr}, $src->{nick}, "\001VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE."-".Auto::GR." ".$OSNAME."\001"); + notice($src->{svr}, $src->{nick}, "\001VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE."-$Auto::VERGITREV ".$OSNAME."\001"); } }