From 39d29854bb72e95d3376a8b323bce0b228cf107a Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 9 Sep 2014 15:25:15 -0300 Subject: [PATCH] quick-start: don't wipe the development DB every time --- script/quick-start | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/script/quick-start b/script/quick-start index d7fc2dc..d9e5a0b 100755 --- a/script/quick-start +++ b/script/quick-start @@ -71,21 +71,24 @@ else fi fi -# create the database with sample data if test -e config/database.yml && test "$force_install" = 'false'; then say 'Not updating existent database.yml.' - say 'If you wish to automatic reconfigure your database connection, you can delete config/database.yml and run this script again.' + say 'If you wish to automatic reconfigure your database connection and' + say 'recreate the database, you can delete config/database.yml and run' + say 'this script again.' else + # create the database with sample data say 'Configuring Noosfero to use PostgreSQL, with your user.' run cp config/database.yml.pgsql config/database.yml sed -ri "s/username: noosfero/username: $USER/" config/database.yml sudo su - postgres -c "createuser $USER --no-superuser --createdb --no-createrole" sudo su - postgres -c "createdb noosfero_development -O $USER" + + run rake db:schema:load + run rake db:data:minimal + run rake db:test:prepare + rails runner 'Environment.default.enable("skip_new_user_email_confirmation")' fi -run rake db:schema:load -run rake db:data:minimal -run rake db:test:prepare -rails runner 'Environment.default.enable("skip_new_user_email_confirmation")' # FIXME compile translations depends on ruby-gettext-rails, please see debian/control # run rake noosfero:translations:compile -- libgit2 0.21.2