summaryrefslogtreecommitdiff
path: root/scripts/test_new_version.sh
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2025-11-20 12:31:59 -0300
committerNatalia <124304+nessita@users.noreply.github.com>2025-11-21 15:38:20 -0300
commit2f0947146f48e9cacf671d5e6b3860f1caa5538a (patch)
tree840084da21940b99efb55abe070613819f331498 /scripts/test_new_version.sh
parent53c9de624e21fba2606f1b4f33690504fdc39c41 (diff)
[5.2.x] Added scripts for building and releasing Django artifacts.
Backport of a523d5c8336f5f7f5e24a1cc8034ce65aedec3c6 from main.
Diffstat (limited to 'scripts/test_new_version.sh')
-rwxr-xr-xscripts/test_new_version.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/test_new_version.sh b/scripts/test_new_version.sh
new file mode 100755
index 0000000000..50fff186c4
--- /dev/null
+++ b/scripts/test_new_version.sh
@@ -0,0 +1,48 @@
+#! /bin/bash
+
+# Original author: Tim Graham.
+
+set -xue
+
+cd /tmp
+
+RELEASE_VERSION="${VERSION}"
+if [[ -z "$RELEASE_VERSION" ]]; then
+ echo "Please set VERSION as env var"
+ exit 1
+fi
+
+PKG_TAR=$(curl -Ls -o /dev/null -w '%{url_effective}' https://www.djangoproject.com/download/$RELEASE_VERSION/tarball/)
+echo $PKG_TAR
+
+PKG_WHL=$(curl -Ls -o /dev/null -w '%{url_effective}' https://www.djangoproject.com/download/$RELEASE_VERSION/wheel/)
+echo $PKG_WHL
+
+python3 -m venv django-pip
+. django-pip/bin/activate
+python -m pip install --no-cache-dir $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 --no-cache-dir $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