drgn/scripts/build_dists.sh
Omar Sandoval 145ac798cb scripts/build_dists.sh: default to Podman instead of Docker
It's nice running without root/sudo, and it's also nice not needing to
enable an extra repository to install Docker.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-01-17 01:26:35 -08:00

31 lines
693 B
Bash
Executable File

#!/bin/sh
# Copyright (c) Meta Platforms, Inc. and affiliates.
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
: "${PYTHON=python3}"
"$PYTHON" setup.py sdist
SDIST=dist/drgn-"$("$PYTHON" setup.py --version)".tar.gz
if [ "${DOCKER+set}" = set ]; then
PODMAN="$DOCKER"
PODMAN_OPTS="--env OWNER=$(id -u):$(id -g)"
else
PODMAN=podman
PODMAN_OPTS="--security-opt label=disable"
fi
$PODMAN run -it \
--env PLAT=manylinux2014_x86_64 \
--env SDIST="$SDIST" \
$PODMAN_OPTS \
--volume "$(pwd)":/io:ro \
--volume "$(pwd)/dist":/io/dist \
--workdir /io \
--hostname drgn \
--rm \
--pull always \
quay.io/pypa/manylinux2014_x86_64 \
./scripts/build_manylinux_in_docker.sh "${1:-}"