Skip to content

Commit

Permalink
run upgrades in alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Sep 21, 2010
1 parent 4c4ff79 commit 6f4e341
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/WebGUI/Upgrade.pm
Expand Up @@ -323,16 +323,20 @@ sub runUpgradeStep {

my ($version) = $step =~ /-(\d+\.\d+\.\d+)$/;
my $upgradesDir = File::Spec->catdir(WebGUI::Paths->upgrades, $step);
my @files;
opendir my($dh), $upgradesDir or die "Can't get upgrades for $step: $!\n";
while ( my $upgradeFile = readdir $dh ) {
next
if $upgradeFile =~ /^\./;
my $filename = File::Spec->catfile($upgradesDir, $upgradeFile);
next
unless -f $filename;
$self->runUpgradeFile($configFile, $version, $filename);
push @files, $filename;
}
closedir $dh;
for my $filename ( sort @files ) {
$self->runUpgradeFile($configFile, $version, $filename);
}
$self->markVersionUpgrade($configFile, $version);
}

Expand Down

0 comments on commit 6f4e341

Please sign in to comment.