2010-06-05 06:34:14 +02:00
|
|
|
# File: VERSION.pm
|
|
|
|
#
|
2021-07-27 21:01:42 +02:00
|
|
|
# Purpose: Keeps track of bot version. All of PBot is considered a single
|
|
|
|
# entity. The BUILD_REVSION constant in this file is the count of git commits
|
|
|
|
# to the PBot repository when this file was updated. This file is updated by
|
|
|
|
# the /misc/update_version script after any commits that alter PBot's behavior.
|
|
|
|
#
|
|
|
|
# See also PBot::Core::Commands::Version, which can compare current version
|
|
|
|
# against latest version on github or URL in `version.check_url` registry
|
|
|
|
# entry to notify users of the availability of a new version.
|
|
|
|
#
|
|
|
|
# TODO: The PBot::Plugin::* plugins probably should have their own version
|
|
|
|
# identifiers as a template for using versioned $HOME/PBot/Plugin/ plugins. I
|
|
|
|
# don't want to micro-manage version identifiers for PBot::Core stuff though.
|
2010-06-05 06:34:14 +02:00
|
|
|
|
2021-07-11 00:00:22 +02:00
|
|
|
# SPDX-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
|
|
|
|
# SPDX-License-Identifier: MIT
|
2017-03-05 22:33:31 +01:00
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
package PBot::VERSION;
|
2021-07-21 07:44:51 +02:00
|
|
|
use parent 'PBot::Core::Class';
|
2010-06-05 06:34:14 +02:00
|
|
|
|
2021-06-19 06:23:34 +02:00
|
|
|
use PBot::Imports;
|
2019-07-11 03:40:53 +02:00
|
|
|
|
2021-07-21 08:06:03 +02:00
|
|
|
use Exporter qw/import/;
|
|
|
|
our @EXPORT = ();
|
|
|
|
our %EXPORT_TAGS = (
|
|
|
|
'all' => [qw/BUILD_NAME BUILD_REVISION BUILD_DATE/],
|
|
|
|
);
|
|
|
|
our @EXPORT_OK = (
|
|
|
|
@{ $EXPORT_TAGS{all} },
|
|
|
|
);
|
2020-01-20 04:53:45 +01:00
|
|
|
|
2021-07-27 21:01:42 +02:00
|
|
|
# These are set automatically by the /misc/update_version script
|
2010-06-05 06:34:14 +02:00
|
|
|
use constant {
|
2020-02-15 23:38:32 +01:00
|
|
|
BUILD_NAME => "PBot",
|
2021-07-27 21:01:42 +02:00
|
|
|
BUILD_REVISION => 4317,
|
|
|
|
BUILD_DATE => "2021-07-27",
|
2010-06-05 06:34:14 +02:00
|
|
|
};
|
|
|
|
|
2020-02-08 20:04:13 +01:00
|
|
|
sub initialize {
|
2021-07-21 08:20:24 +02:00
|
|
|
# nothing to do here
|
2018-01-23 08:48:25 +01:00
|
|
|
}
|
|
|
|
|
2021-06-05 22:20:03 +02:00
|
|
|
sub version {
|
|
|
|
return BUILD_NAME . " version " . BUILD_REVISION . " " . BUILD_DATE;
|
|
|
|
}
|
2020-05-04 22:21:35 +02:00
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
1;
|