improve pypi build.sh and add distribute.sh
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
script_dir="$(dirname "$(readlink -f -- "$BASH_SOURCE")")"
|
|
||||||
pkg_dir="$(realpath "${script_dir}/../..")"
|
PYTHON=$(which python)
|
||||||
setup="$(which python) setup.py"
|
|
||||||
|
script_dir=$(dirname "$(readlink -f -- "$BASH_SOURCE")")
|
||||||
|
pkg_dir=$(realpath "${script_dir}"/../..)
|
||||||
|
|
||||||
cd "${pkg_dir}"
|
cd "${pkg_dir}"
|
||||||
${setup} clean
|
${PYTHON} setup.py clean
|
||||||
${setup} sdist bdist_wheel
|
${PYTHON} setup.py sdist bdist_wheel
|
||||||
|
|||||||
16
distribution/pypi/distribute.sh
Executable file
16
distribution/pypi/distribute.sh
Executable 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}
|
||||||
Reference in New Issue
Block a user