1
0
mirror of https://github.com/quay/quay.git synced 2026-01-29 08:42:15 +03:00
Files
quay/hack/verify-requirements.sh
Oleg Bulatov 53e4394272 chore: Remove Docker Build jobs (PROJQUAY-5519) (#1888)
* chore: Use recent versions of GitHub Actions

* chore: Extract hack/verify-requirements.sh

* chore: Remove Docker Builds from CI and keep Cypress Tests

* chore: Use cypress-io/github-action@v5
2023-05-18 16:45:42 +02:00

17 lines
691 B
Bash
Executable File

#!/bin/sh -eu
TMP=$(mktemp -d "${TMPDIR:-/tmp/}quay-verify-requirements.XXXXXXXX")
TMP_PACKAGESDIR="$TMP/packages"
TMP_REQUIREMENTS="$TMP/requirements.txt"
TMP_PIP_FREEZE="$TMP/pip-freeze.txt"
trap 'rc=$?; rm -rf "$TMP"; exit $rc' EXIT
sed -n 's/ *#.*//; s/\[[^]]*\]//g; s/^pip==.*/pip/; /./p' ./requirements.txt | sort >"$TMP_REQUIREMENTS"
pip install --target="$TMP_PACKAGESDIR" -r ./requirements.txt
pip freeze --path="$TMP_PACKAGESDIR" --all | sed 's/^pip==.*/pip/' | sort >"$TMP_PIP_FREEZE"
if ! diff -u "$TMP_REQUIREMENTS" "$TMP_PIP_FREEZE"; then
echo >&2 "requirements.txt doesn't have all dependencies pinned. Please check output above to see what should be added."
exit 1
fi