2021-02-16 11:01:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring"
|
|
|
|
|
|
|
|
find -maxdepth 1 -not -name "fence-agents-*.tar.gz" -and \( -name "*.whl" -or -name "*.tar.?z*" \) -delete
|
|
|
|
sed -i -n -E '/\(fence-agents-/p' sources
|
|
|
|
sha512sum --tag requirements-*.txt >> sources
|
|
|
|
|
2021-05-18 14:40:02 +00:00
|
|
|
for x in requirements-*.txt; do
|
|
|
|
echo "# $x" | sed -E "s/requirements-(.*).txt/\1/" >> sources
|
|
|
|
pip download -r $x | awk '/Saved/{gsub("./", "", $2); print $2}' | sort | xargs sha512sum --tag >> sources
|
2021-02-16 11:01:41 +00:00
|
|
|
done
|
|
|
|
|
2021-05-18 14:40:02 +00:00
|
|
|
awk 'NR<8{next} /^# /{print}; /^[^#]/{gsub("[()]", "", $2); printf "Source%d: %s\n", 1000+c++, $2}' sources
|
2021-02-16 11:01:41 +00:00
|
|
|
|
|
|
|
sed -i '/^#/d' sources
|
|
|
|
|
|
|
|
if ! git diff --quiet sources; then
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
Upload new sources by running:
|
2021-05-19 12:24:11 +00:00
|
|
|
awk '/^[^#]/{gsub("[()]", "", \$2); printf "%s ", \$2}' sources | xargs centpkg new-sources
|
2021-02-16 11:01:41 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|