version tags now commit everything at the end of the upgrade
This commit is contained in:
parent
5cf7f98d32
commit
d936bbfa2b
2 changed files with 10 additions and 4 deletions
|
|
@ -46,6 +46,8 @@ sub start {
|
||||||
);
|
);
|
||||||
my $session = WebGUI::Session->open("../..",$configFile);
|
my $session = WebGUI::Session->open("../..",$configFile);
|
||||||
$session->user({userId=>3});
|
$session->user({userId=>3});
|
||||||
|
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||||
return $session;
|
return $session;
|
||||||
}
|
}
|
||||||
|
|
@ -53,6 +55,8 @@ sub start {
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub finish {
|
sub finish {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
|
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
$versionTag->commit;
|
||||||
$session->close();
|
$session->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ use lib "../../lib";
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
|
use WebGUI::VersionTag;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
use WebGUI::Workflow;
|
use WebGUI::Workflow;
|
||||||
use WebGUI::Workflow::Cron;
|
use WebGUI::Workflow::Cron;
|
||||||
|
|
@ -329,7 +330,6 @@ sub updateTemplates {
|
||||||
url=> "6_9_0_new_templates",
|
url=> "6_9_0_new_templates",
|
||||||
groupIdView=>"12"
|
groupIdView=>"12"
|
||||||
});
|
});
|
||||||
$folder->commit;
|
|
||||||
foreach my $file (@files) {
|
foreach my $file (@files) {
|
||||||
next unless ($file =~ /\.tmpl$/);
|
next unless ($file =~ /\.tmpl$/);
|
||||||
open(FILE,"<templates-6.99.0/".$file);
|
open(FILE,"<templates-6.99.0/".$file);
|
||||||
|
|
@ -358,13 +358,11 @@ sub updateTemplates {
|
||||||
if ($create) {
|
if ($create) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
my $template = $folder->addChild(\%properties, $properties{id});
|
my $template = $folder->addChild(\%properties, $properties{id});
|
||||||
$template->commit;
|
|
||||||
} else {
|
} else {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
my $template = WebGUI::Asset->new($session,$properties{id}, "WebGUI::Asset::Template");
|
my $template = WebGUI::Asset->new($session,$properties{id}, "WebGUI::Asset::Template");
|
||||||
if (defined $template) {
|
if (defined $template) {
|
||||||
my $newRevision = $template->addRevision(\%properties);
|
my $newRevision = $template->addRevision(\%properties);
|
||||||
$newRevision->commit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -654,7 +652,7 @@ sub updateHelpTemplate {
|
||||||
</tmpl_if>
|
</tmpl_if>
|
||||||
EOT
|
EOT
|
||||||
my $asset = WebGUI::Asset->new($session,"PBtmplHelp000000000001","WebGUI::Asset::Template");
|
my $asset = WebGUI::Asset->new($session,"PBtmplHelp000000000001","WebGUI::Asset::Template");
|
||||||
$asset->addRevision({template=>$template})->commit;
|
$asset->addRevision({template=>$template});
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- DO NOT EDIT BELOW THIS LINE ----
|
# ---- DO NOT EDIT BELOW THIS LINE ----
|
||||||
|
|
@ -669,6 +667,8 @@ sub start {
|
||||||
);
|
);
|
||||||
my $session = WebGUI::Session->open("../..",$configFile);
|
my $session = WebGUI::Session->open("../..",$configFile);
|
||||||
$session->user({userId=>3});
|
$session->user({userId=>3});
|
||||||
|
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||||
return $session;
|
return $session;
|
||||||
}
|
}
|
||||||
|
|
@ -676,6 +676,8 @@ sub start {
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub finish {
|
sub finish {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
|
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
$versionTag->commit;
|
||||||
$session->close();
|
$session->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue