Browse Source

Handle move of sysprefs.sql (bug 23895)

merge-requests/18/head
Jonathan Druart 8 months ago
parent
commit
8d45eb1779
2 changed files with 13 additions and 7 deletions
  1. +7
    -6
      get_bugs.pl
  2. +6
    -1
      lib/Koha/Release.pm

+ 7
- 6
get_bugs.pl View File

@@ -330,12 +330,13 @@ if (scalar @bug_list) {
$arguments{nb_newfeatures} = $nb_newfeatures;
}

open (SYSPREFS, "git show $tag:installer/data/mysql/sysprefs.sql |");
my @prev_pref_script = <SYSPREFS>;
close SYSPREFS;
open (SYSPREFS, "git show HEAD:installer/data/mysql/sysprefs.sql |");
my @current_pref_script = <SYSPREFS>;
close SYSPREFS;
my $sysprefs_path = 'installer/data/mysql/mandatory/sysprefs.sql';
my $old_sysprefs_path = 'installer/data/mysql/sysprefs.sql'; # Before 23895
my @prev_pref_script = qx{git show $tag:$sysprefs_path 2> /dev/null};
@prev_pref_script = qx{git show $tag:$old_sysprefs_path} unless @prev_pref_script;

my @current_pref_script = `git show HEAD:$sysprefs_path 2> /dev/null`;
@current_pref_script = `git show HEAD:$old_sysprefs_path` unless @current_pref_script;

my %prev_sysprefs =
map { lc($_) => $_ }


+ 6
- 1
lib/Koha/Release.pm View File

@@ -753,13 +753,18 @@ sub sysprefs {
my ($from, $to) =
$range =~ /(.*)\.\.(.*)/ ? ($1, $2) : ($range, 'HEAD');

my $sysprefs_path = 'installer/data/mysql/mandatory/sysprefs.sql';
my $old_sysprefs_path = 'installer/data/mysql/sysprefs.sql'; # Before 23895

my %syspref = map {
my ($where, $pos) = @$_;
my @sysprefs = qx{git show $pos:$sysprefs_path 2> /dev/null};
@sysprefs = qx{git show $pos:$old_sysprefs_path} unless @sysprefs;
my %all =
map { $_ => 1 }
map { /\(\s*'([^']+)'/; $1 }
grep { /\(\s*'/ }
qx|git show $pos:installer/data/mysql/sysprefs.sql|;
@sysprefs;
$where => \%all
} ( ['prev', $from], ['curr', $to]);



Loading…
Cancel
Save