diff --git a/bin/pypi-check-versions b/bin/pypi-check-versions new file mode 100755 index 0000000..9efe671 --- /dev/null +++ b/bin/pypi-check-versions @@ -0,0 +1,19 @@ +#!/bin/bash +mr -m run bash -c ' +if [[ $(basename $PWD) =~ ^(swh-docs|swh-py-template)$ ]]; then +echo SKIP $(basename $PWD) +else +if [ -f setup.py ] ; then +PKG=$(python3 setup.py --name) +if [ -n "$PKG" ]; then +PYPI=v$(http https://pypi.org/pypi/$PKG/json | jq -r .info.version) +LASTTAG=$(git tag --sort v:refname | tail -n1) +if [ v"$LASTTAG" == v"$PYPI" ]; then + echo "OK $PKG $LASTTAG" +else + (>&2 echo "$PKG $LASTTAG (git) != $PYPI (pypi)") +fi +fi +fi +fi +' | grep -v 'mr run'