Version 1 (modified by Natalia Bidart, 4 weeks ago) ( diff )

Initial version of test new version script (credits to Tim Graham).

This bash script can be used to test new versions for a Django release. Provides a minimal sanity check on the tarball and wheel artifacts.

#! /bin/bash

set -xue

cd /tmp

RELEASE_VERSION="${RELEASE_VERSION}"
if [[ -z "$RELEASE_VERSION" ]]; then
    echo "Please set RELEASE_VERSION as env var"
    exit 1
fi

MAJOR_VERSION=`echo $RELEASE_VERSION| cut -c 1-3`
PKG_TAR="https://www.djangoproject.com/m/releases/$MAJOR_VERSION/Django-$RELEASE_VERSION.tar.gz"
PKG_WHL="https://www.djangoproject.com/m/releases/$MAJOR_VERSION/Django-$RELEASE_VERSION-py3-none-any.whl"

python3 -m venv django-pip
. django-pip/bin/activate
python -m pip install $PKG_TAR 
django-admin startproject test_one
cd test_one
./manage.py --help  # Ensure executable bits
python manage.py migrate
python manage.py runserver

deactivate
cd ..
rm -rf test_one
rm -rf django-pip


python3 -m venv django-pip-wheel
. django-pip-wheel/bin/activate
python -m pip install $PKG_WHL 
django-admin startproject test_one
cd test_one
./manage.py --help  # Ensure executable bits
python manage.py migrate
python manage.py runserver

deactivate
cd ..
rm -rf test_one
rm -rf django-pip-wheel
Note: See TracWiki for help on using the wiki.
Back to Top