Feature #299 » 0001-Added-extras-dbmigrate-which-tests-for-a-specific-us.patch
extras/dbmigrate | ||
---|---|---|
#!/bin/sh
|
||
USERNAME=$(/usr/bin/id -un)
|
||
WANTED_USER=${1:-'foreman'}
|
||
if [ $USERNAME = $WANTED_USER ]; then
|
||
cd && echo /usr/bin/rake db:migrate RAILS_ENV=production
|
||
else
|
||
echo "$0 has to be run as user ${WANTED_USER}!"
|
||
exit 1
|
||
fi
|