2010-06-05 06:34:14 +02:00
|
|
|
# File: VERSION.pm
|
|
|
|
#
|
2020-01-20 05:10:46 +01:00
|
|
|
# Purpose: Keeps track of bot version. Can compare current version against
|
2021-06-19 06:23:34 +02:00
|
|
|
# latest version on github or URL in `version.check_url` registry entry.
|
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
|
|
|
|
2020-02-08 20:04:13 +01: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-24 02:01:22 +02:00
|
|
|
BUILD_REVISION => 4285,
|
2021-07-23 16:27:27 +02:00
|
|
|
BUILD_DATE => "2021-07-23",
|
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;
|