Files
growstuff/script/deploy-tasks.sh
Lucy e7b0165628 Updated script/deploy-tasks.sh to include nil_account_type task.
We added a rake task to ensure all account have a Free account
type. This ensures the new nil_account_type rake task will be run
at deploy time.
2013-07-03 11:22:47 +01:00

50 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# tasks to run at deploy time, usually after 'rake db:migrate'
# When adding tasks, do so in chronological order, and note the date
# when it was added. This will help us know which ones have been run
# and can safely be commented out or removed.
# echo "2013-05-?? - Replacing empty post/notification subjects with '(no subject)'"
# rake growstuff:oneoff:empty_subjects
# echo "2013-06-03 - replace empty garden names with 'Garden'"
# rake growstuff:oneoff:empty_garden_names
# you MUST set up the paypal API environment variables before doing
# anything else, or things will fail all over the place. Stupid paypal :(
echo "2013-06-04 - set up Paypal API"
if [ ! $PAYPAL_USERNAME ]
then
echo "You must run:"
echo " heroku config:set PAYPAL_USERNAME=..."
failed=true
fi
if [ ! $PAYPAL_PASSWORD ]
then
echo "You must run:"
echo " heroku config:set PAYPAL_PASSWORD=..."
failed=true
fi
if [ ! $PAYPAL_SIGNATURE ]
then
echo "You must run:"
echo " heroku config:set PAYPAL_SIGNATURE=..."
failed=true
fi
if [ $failed ]
then
exit
fi
echo "2013-06-04 - set up shop/products/etc"
rake growstuff:oneoff:setup_shop
echo "2013-07-03 - set up Free account types for all members"
rake growstuff:oneoff:nil_account_type