improve pypi build.sh and add distribute.sh

This commit is contained in:
2020-11-05 14:18:54 +01:00
parent 7ac750220d
commit b2f0758931
2 changed files with 24 additions and 5 deletions

16
distribution/pypi/distribute.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -e
TWINE=$(which twine)
script_dir=$(dirname "$(readlink -f -- "$BASH_SOURCE")")
pkg_dir=$(realpath "${script_dir}/../..")
cd "${pkg_dir}/dist"
msg="Select version to distribute (cancel with CTRL+C):"
echo "${msg}"
select version in $(find . -maxdepth 1 -type f -name "pyinotifyd-*.*.*.tar.gz" -printf "%f\n" | sed "s#\.tar\.gz##g"); do
[ -n "${version}" ] && break
echo -e "\ninvalid choice\n\n${msg}"
done
${TWINE} upload "${version}"{.tar.gz,-*.whl}