From 7ff652c2933515f696a83853ebaf0170cf9eda33 Mon Sep 17 00:00:00 2001 From: Brad Parbs Date: Mon, 15 Dec 2014 13:44:48 -0600 Subject: [PATCH] Fix deployment setup --- vv | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/vv b/vv index b35bfb5..b872521 100755 --- a/vv +++ b/vv @@ -875,21 +875,24 @@ function deployment_setup() { echo " Passive Mode: $passive" echo " Secure Mode: $secure" echo " destination: $destination" + cp "$path/Vagrantfile" "$path/Vagrantfile-backup" + { echo "# begin-vv-$site-$deployment_name" - echo "config.push.define \"$site-$deployment_name\", strategy: \"ftp\" do |push|" - echo " push.host =\"$host\"" - echo " push.username =\"$username\"" - echo " push.password =\"$password\"" - echo " push.passive =\"$passive\"" - echo " push.secure =\"$secure\"" - echo " push.destination =\"$destination\"" - echo " push.dir = \"htdocs\"" - echo " push.exclude = \"wp-config.php\"" - echo "end" + echo " config.push.define \"$site-$deployment_name\", strategy: \"ftp\" do |push|" + echo " push.host =\"$host\"" + echo " push.username =\"$username\"" + echo " push.password =\"$password\"" + echo " push.passive =\"$passive\"" + echo " push.secure =\"$secure\"" + echo " push.destination =\"$destination\"" + echo " push.dir = \"htdocs\"" + echo " push.exclude = \"wp-config.php\"" + echo " end" echo "# end-vv-$site-$deployment_name" } >> "$path/Vagrantfile" - + echo "$(sed '$ d' < "$path/Vagrantfile")" > "$path/Vagrantfile" + echo "end" >> "$path/Vagrantfile" success "Deployment setup finished. You can now deploy with a 'vv -v push $site-$deployment_name'" }