Skip to content

Commit

Permalink
Make sure dependency installation completes before checking for phinx
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasziegler committed Jan 4, 2016
1 parent 65da77d commit 4cad664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,11 @@ if [ $? -gt 0 ]; then
exit 1
fi
fi
# Check phinx
if [[ ! -f "$phinx" && "$migrate" = true ]]; then
echo "!!! Migration tool phinx not installed, unable to run migrations"
exit 1
fi

# Disable interactive questions
if [ "$nointeraction" = true ]; then
echo ">>> Disable interactive questions"
composer="$composer --no-interaction"
phinx="$phinx --no-interaction"
fi

# Deployment mode, disable all developer dependencies :)
Expand All @@ -111,6 +105,15 @@ else
fi

if [ "$migrate" = true ]; then
# Check phinx
if [ ! -f "$phinx" ]; then
echo "!!! Migration tool phinx not installed, unable to run migrations"
exit 1
fi
# Disable interactive questions
if [ "$nointeraction" = true ]; then
phinx="$phinx --no-interaction"
fi
echo ">>> Running migrations"
$phinx migrate -c application/phinx.php
else
Expand Down
1 change: 1 addition & 0 deletions puppet/platform/manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
command => "/var/www/bin/update --no-interaction",
cwd => "/var/www",
logoutput => true,
timeout => 0,
require => [ Mysql::Db["ushahidi"],
File["/var/www/.env"],
Package["php5-cli"],
Expand Down

0 comments on commit 4cad664

Please sign in to comment.