File: test-sdist-with-docker

package info (click to toggle)
trash-cli 0.24.5.26-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,972 kB
  • sloc: python: 9,789; sh: 121; makefile: 11
file content (26 lines) | stat: -rwxr-xr-x 485 bytes parent folder | download
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
  )"