summaryrefslogtreecommitdiff
path: root/generate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate.sh')
-rwxr-xr-xgenerate.sh24
1 files changed, 14 insertions, 10 deletions
diff --git a/generate.sh b/generate.sh
index 4d70de1..f0db78e 100755
--- a/generate.sh
+++ b/generate.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -x
# The generate.sh bash file is used to generate all of the necessary .rb files to run the website
#
@@ -10,9 +11,11 @@
# To Clear the Generated Files:
# git clean -df
#
-NOTEST='--skip-test-unit'
+#NOTEST='--skip-test-unit'
+
+git rm -rf app test config/routes.rb db/migrate
+git checkout clean-start -- app test config/routes.rb
-set -x
bundle exec rails generate scaffold server --force $NOTEST
bundle exec rails generate scaffold tournament game:references $NOTEST
bundle exec rails generate scaffold match tournament:references name:string --force $NOTEST
@@ -20,30 +23,31 @@ bundle exec rails generate scaffold team $NOTEST
bundle exec rails generate scaffold alert author:references message:text $NOTEST
bundle exec rails generate scaffold pm author:references recipient:references message:text $NOTEST
bundle exec rails generate scaffold game name:text players_per_team:integer teams_per_match:integer set_rounds:integer randomized_teams:integer --force $NOTEST
+bundle exec rails generate scaffold user name:string email:string user_name:string $NOTEST
bundle exec rails generate model game_attribute game:references key:text type:integer $NOTEST
bundle exec rails generate model server_settings $NOTEST
-bundle exec rails generate model user name:string email:string user_name:string $NOTEST
bundle exec rails generate model user_team_pair user:references team:references $NOTEST
bundle exec rails generate model team_match_pair team:references match:references $NOTEST
bundle exec rails generate controller search $NOTEST
bundle exec rails generate controller main $NOTEST
bundle exec rails generate controller static $NOTEST
-bundle exec rails generate controller users $NOTEST
-bundle exec rails generate controller Sessions
+bundle exec rails generate controller sessions
#added some stuff to the database
-rails generate migration add_index_to_user_email
-rails generate migration add_index_to_user_name
-rails generate migration add_password_digest_to_users
-rails generate migration add_remember_token_to_users
+bundle exec rails generate migration add_index_to_users_email
+bundle exec rails generate migration add_index_to_users_user_name
+bundle exec rails generate migration add_password_digest_to_users
+bundle exec rails generate migration add_remember_token_to_users
#for the tournament controller to generate options
bundle exec rails generate model tournament_option $NOTEST
+#bundle exec rails generate scaffold
bundle exec rake db:drop RAILS_ENV=development
bundle exec rake db:migrate RAILS_ENV=development
bundle exec rake db:seed
-#bundle exec rails generate scaffold
+
+git add app test config/routes.rb db/migrate db/schema.rb