Skip to content

Commit

Permalink
Moved dbconfig->postinst to just global postinst so no-db apps can ha…
Browse files Browse the repository at this point in the history
…ve it too
  • Loading branch information
mjollnir committed Feb 11, 2011
1 parent 99d1d1c commit 15b8789
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ packagemanifest.yml
dbconfig:
dbtypes: pgsql
create: false
postinst:
# probably better to run migrations here :)
- 'doctrine:schema:drop --force'
- 'doctrine:schema:create'
postinst:
# probably better to run migrations here :)
- 'doctrine:schema:drop --force'
- 'doctrine:schema:create'
installfiles:
- 'app/main'
- 'app/autoload.php'
Expand Down
9 changes: 8 additions & 1 deletion lib/Liip/Symfony2/Application.pm
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,15 @@ sub make_postinst {

my $postinstconfigureenddb = '';

my $pi = '';
if ($self->{wantsdb} && $self->{dbconfig}->{postinst}) {
my $pi = $self->{dbconfig}->{postinst};
$pi = $self->{dbconfig}->{postinst};
warn "Using depcreated dbconfig only postinst. Switch to global postinst!";
}
if ($self->{postinst}) {
$pi = $self->{postinst}
}
if ($pi) {
$postinstconfigureenddb .= 'su -c "{ cd _-_WWWROOT_-_ && ';
my $errstr = '';
if (ref $pi eq 'ARRAY') {
Expand Down

0 comments on commit 15b8789

Please sign in to comment.