#!/bin/sh # Writes packages/server/test/tickets.python.json: the dashboard's entry # tickets as itsdangerous makes and reads them (plan ยง8.5). Needs Python 3; # itsdangerous comes in the dashboard's version into a venv of its own. set -eu here="$(cd "$(dirname "$0")" && pwd)" root="$(cd "$here/../.." && pwd)" if [ ! -x "$here/.venv/bin/python" ]; then python3 -m venv "$here/.venv" "$here/.venv/bin/pip" install -q itsdangerous==2.2.0 fi out="$root/packages/server/test/tickets.python.json" # Removed first: a crashed run must not leave the previous result standing. rm -f "$out" "$here/.venv/bin/python" "$here/tickets.py" "$out" test -s "$out"