1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/bash
set -euo pipefail
usage="
Usage:
$BASH_SOURCE PYTHON_VERSION
Example:
$BASH_SOURCE 2.7
Which values can I use for PYTHON_VERSION?
All the supported tags you can find on the docker official image of Python:
https://hub.docker.com/_/python
"
python_version=${1?"missing PYTHON_VERSION
$usage
"}
docker run --rm -it "$(
cat << EOF | docker build -t trash-cli-sdist -f- -q .
FROM python:$python_version
COPY . /app
WORKDIR /app
ENTRYPOINT scripts/test-sdist
EOF
)"
|