Skip to content

Commit

Permalink
Merge pull request #1511 from RotherOSS/issue-#1510-otobo_version_check
Browse files Browse the repository at this point in the history
Issue #1510 otobo version check
  • Loading branch information
bschmalhofer authored Dec 16, 2021
2 parents 2423761 + 2db1722 commit b6845c9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Kernel/System/MigrateFromOTRS/OTOBOFrameworkVersionCheck.pm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ sub _CheckOTOBOVersion {
my $Message = $Self->{LanguageObject}->Translate("Check if OTOBO version is correct.");
my $Location = "$OTOBOHome/RELEASE";

# load RELEASE file
# check existence of the RELEASE file
if ( !-e $Location ) {
return
{
Expand All @@ -187,6 +187,7 @@ sub _CheckOTOBOVersion {
};
}

# parse RELEASE file
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');
my $ReleaseInfo = $MainObject->GetReleaseInfo( Location => $Location );

Expand All @@ -209,7 +210,8 @@ sub _CheckOTOBOVersion {
};
}

if ( $ReleaseInfo->{Version} !~ m/^10\.1(.*)$/ ) {
# Note: this check must be updated for every major and minor version
if ( $ReleaseInfo->{Version} !~ m/^10.0(.*)$/ ) {
return {
Message => $Message,
Comment => $Self->{LanguageObject}->Translate( 'You are trying to run this script on the wrong framework version %s!', $ReleaseInfo->{Version} ),
Expand Down Expand Up @@ -256,6 +258,7 @@ sub _CheckOTRSRelease {
'OTRS' => 'https://otrs.com/',
'Znuny LTS' => 'https://www.znuny.org/',
);

if ( !$ProductNameIsValid{ $ReleaseInfo->{Product} } ) {
my $ExpectedNames = join ', ', map {"'$_'"} sort keys %ProductNameIsValid;

Expand Down

0 comments on commit b6845c9

Please sign in to comment.