Commit 3763a877 authored by Akash Agrawall's avatar Akash Agrawall Committed by Jan Berdajs

Environment sanity checks in script/server #3824

parent c95dd685
......@@ -61,6 +61,33 @@ then
fatal "config/diaspora.yml is missing! Copy over config/diaspora.yml.example to config/diaspora.yml and edit it properly!"
fi
# Check if detached head state
if git status | grep 'Changes not staged for commit' > /dev/null ;
then
warning "Your changes are not staged for commit. Kindly stash or commit them"
fi
# Check if RVM available
if rvm -v | grep 'No command '"'"'rvm'"'"' found' > /dev/null ;
then
warning "RVM is not installed on the system. Please install it"
fi
# Check if bundle is complete
if ! bundle check > /dev/null
then
fatal "Your bundle is not up to date, run the command \"bundle install\""
fi
# Check if database is migrated and correct gemset
if rake db:migrate:status | grep 'down' > /dev/null ;
then
warning "Your database is not migrated, run the command \"rake db:migrate\""
elif rake db:migrate:status | grep 'rake aborted' > /dev/null ;
then
warning "The gemset is not correct"
fi
# Setup environment
if [ -z "$RAILS_ENV" ]
then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment