* Code added to read/reread VERSION on load/reload
git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/rebranding@1557
c11ca15a-4712-0410-83d8-
924469b57eb5
$notsize = 0;
$notcount = 0;
###
-$bot_release = "1.3.3";
-if ( -d 'CVS' ) {
- use POSIX qw(strftime);
- $bot_release .= strftime(" cvs (%Y%m%d)", gmtime( (stat('CVS'))[9] ) );
-}
+open(VERSION, '<VERSION');
+$bot_release = <VERSION> || "(unknown version)";
+chomp($bot_release);
+close(VERSION);
$bot_version = "infobot $bot_release -- $^O";
$noreply = 'NOREPLY';
use strict;
-use vars qw($AUTOLOAD $no_timehires);
+use vars qw($AUTOLOAD $no_timehires $bot_version $bot_release);
###
### REQUIRED MODULES.
my $retval = '';
&VERB("Module: reloading all.",2);
+
+ # Reload version and save
+ open(VERSION,"<VERSION");
+ $bot_release = <VERSION> || "(unknown version)";
+ chomp($bot_release);
+ $bot_version = "infobot $bot_release -- $^O";
+ close(VERSION);
# obscure usage of map and regex :)
foreach (map { s/.*?\/?src/src/; $_ } keys %moduleAge) {