Skip to content

Commit 5b4c512

Browse files
committedJul 26, 2019
issue: THIS_VERSION Utilize MAJOR_VERSION
This addresses an issue where using osTicket from git would show the incorrect git version in `Admin Panel > Dashboard > Information`. This is due to a hardcoded git version of `1.8-git`. This updates `THIS_VERSION` to utilize `MAJOR_VERSION` so that it sets the correct git version. This also updates the `deploy` CLI module to match the same format (example: `1.12-git`).
1 parent 25d775e commit 5b4c512

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ function croak($message) {
314314
/*############## Do NOT monkey with anything else beyond this point UNLESS you really know what you are doing ##############*/
315315

316316
#Current version && schema signature (Changes from version to version)
317-
define('THIS_VERSION','1.8-git'); //Shown on admin panel
318317
define('GIT_VERSION','$git');
319318
define('MAJOR_VERSION', '1.10');
319+
define('THIS_VERSION', MAJOR_VERSION.'-git'); //Shown on admin panel
320320
//Path separator
321321
if(!defined('PATH_SEPARATOR')){
322322
if(strpos($_ENV['OS'],'Win')!==false || !strcasecmp(substr(PHP_OS, 0, 3),'WIN'))

‎include/cli/modules/deploy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function getEditedContents($src) {
122122
}
123123

124124
if (!$version)
125-
$version = exec('git describe');
125+
$version = preg_replace('/^v(\d{1}\.\d{2}).*$/', '$1-git', exec('git describe'));
126126

127127
if (!$short || !$version)
128128
return false;

0 commit comments

Comments
 (0)
Please sign in to comment.