Skip to content

Commit

Permalink
More meaningful dev version number and latest release constant
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkshire-pudding committed Jul 12, 2024
1 parent 41d326f commit eb65783
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
10 changes: 9 additions & 1 deletion commands/status.bee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ function status_bee_callback($arguments, $options) {
$rows = array();

if (!empty($_bee_backdrop_root)) {
// Backdrop core.
global $settings, $config_directories;
$rows[] = array(
array('value' => BEE_SYMBOL_BEE),
array('value' => ''),
);
// Backdrop core.
if (defined('BACKDROP_VERSION')) {
$rows[] = array(
array('value' => bt('Backdrop CMS')),
Expand All @@ -49,6 +53,10 @@ function status_bee_callback($arguments, $options) {
array('value' => bt('Bee version')),
array('value' => BEE_VERSION),
);
$rows[] = array(
array('value' => bt('Bee latest release')),
array('value' => BEE_LATEST_RELEASE),
);
$rows[] = array(
array('value' => bt('Bee root directory')),
array('value' => substr(__DIR__, 0, strlen(__DIR__) - 9)),
Expand Down
23 changes: 22 additions & 1 deletion commands/version.bee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,26 @@ function version_bee_command() {
*/
function version_bee_callback($arguments, $options) {
$current_version = BEE_VERSION;
bee_message(bt('Bee for Backdrop CMS - Version ' . $current_version), 'success');
$latest_release = BEE_LATEST_RELEASE;

$output = array();
$output[] = array(
'type' => 'text',
'variables' => array(
'value' => "\n " . BEE_SYMBOL_BEE . ' ' . bt('Bee for Backdrop CMS'),
),
);
$output[] = array(
'type' => 'text',
'variables' => array(
'value' => ' ' . bt('Version: ') . $current_version,
),
);
$output[] = array(
'type' => 'text',
'variables' => array(
'value' => ' ' . bt('Latest Release: ') . $latest_release . "\n",
),
);
return $output;
}
13 changes: 8 additions & 5 deletions includes/globals.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,16 @@ define('BEE_BOOTSTRAP_LANGUAGE', 7);
define('BEE_BOOTSTRAP_FULL', 8);

/**
* Define constant for Bee's current version.
*
* This will normally be '1.x-1.x' but will be changed briefly when a release
* is generated.
* Define constants for Bee's current version and latest release.
*/
// Current version of Bee.
define('BEE_VERSION', '1.x-1.x');
// This will normally be based on the next minor release (e.g '1.x-1.1.x-dev')
// but will be changed briefly when a release is generated.
define('BEE_VERSION', '1.x-1.1.x-dev');

// Latest release.
// This will be updated at each release.
define('BEE_LATEST_RELEASE', '1.x-1.0.2');

/**
* Define constants for symbols to be used within Bee.
Expand Down

0 comments on commit eb65783

Please sign in to comment.