Skip to content

Commit

Permalink
[bug 591417] Add parameter to build.sh to avoid db name collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed Aug 27, 2010
1 parent 4d15da5 commit ef0e846
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ VENV=$WORKSPACE/venv

echo "Starting build..."

if [ -z $1 ]; then
echo "Warning: You should provide a unique name for this job to prevent database collisions."
echo "Usage: ./build.sh <name>"
echo "Continuing, but don't say you weren't warned."
fi

# Clean up after last time.
find . -name '*.pyc' -exec rm {} \;

Expand All @@ -24,6 +30,8 @@ cat > settings_local.py <<SETTINGS
from settings import *
ROOT_URLCONF = 'workspace.urls'
LOG_LEVEL = logging.ERROR
DATABASES['default']['NAME'] = 'kitsune_$1'
DATABASES['default']['TEST_NAME'] = 'test_kitsune_$1'
DATABASES['default']['TEST_CHARSET'] = 'utf8'
DATABASES['default']['TEST_COLLATION'] = 'utf8_general_ci'
SETTINGS
Expand Down

0 comments on commit ef0e846

Please sign in to comment.