3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-02 17:38:50 +02:00
pbot/lib/PBot/VERSION.pm
Pragmatic Software 03fb901291 pbot-vm: fix potential time-out when outputting 0
If the output from a code snippet is `0` without a newline,
Perl treats this as a false value. When Guest::process_command()
returns a false value, that signals to guest-server::serial_server()
that it is the parent returning and so it will not send the result back
to the host.

However, `0\n` is a true value. Solution: always append a final newline to
the guest output.
2022-03-31 19:52:46 -07:00

43 lines
1.1 KiB
Perl

# File: VERSION.pm
#
# Purpose: Sets the PBot version constants.
#
# Rather than each PBot::Core package having its own version identifier, all
# of PBot is considered a single package. The BUILD_REVISION constant is the
# count of git commits to the PBot repository.
#
# See also the version command in PBot::Core::Commands::Version. It can compare
# the local PBot version against latest version on GitHub (or the URL in
# the `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 versioned $HOME/PBot/Plugin/ plugins.
# SPDX-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
# SPDX-License-Identifier: MIT
package PBot::VERSION;
use parent 'PBot::Core::Class';
use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4520,
BUILD_DATE => "2022-03-31",
};
sub initialize {}
sub version {
return BUILD_NAME . ' version ' . BUILD_REVISION . ' ' . BUILD_DATE;
}
sub revision {
return BUILD_REVISION;
}
1;