From 1b8732cf7ed96a24e476630cd99003690a3bce1b Mon Sep 17 00:00:00 2001 From: Hou Tianze Date: Sun, 27 Dec 2015 11:13:22 +0800 Subject: [PATCH] Add in release testing script release.sh --- release.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100755 release.sh diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..cf5269d --- /dev/null +++ b/release.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +actual=0 +build=0 +upload=0 +while getopts "abu" opt; do + case "$opt" in + a) + actual=1 + ;; + b) + build=1 + ;; + u) + build=1 + upload=1 + ;; + esac +done + +if [ "$build" -eq 1 ] +then + rm -Rf dist/* + python3 setup.py sdist bdist_wheel -r testpypi +fi + +if [ "$actual" -eq 0 ] +then + repoopt="-r testpypi" + indexopt="-i https://testpypi.python.org/simple/" +else + repoopt="" + indexopt="" +fi + +uploadcmd="twine upload dist/* $repoopt" +if [ "$upload" -eq 0 ] +then + echo "$uploadcmd" +else + eval "$uploadcmd" +fi + +. ~/Documents/t/venv27/bin/activate +pip install -U bypy $indexopt +bypy -V +deactivate +. ~/Documents/t/venv34/bin/activate +pip install -U bypy $indexopt +bypy -V +deactivate + +# vim: tabstop=4 noexpandtab shiftwidth=4 softtabstop=4 ff=unix fileencoding=utf-8 diff --git a/setup.py b/setup.py index 9cc1616..a07d02c 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( 'baidu cloud storage', 'baidu personal cloud storage', '百度云', '百度云盘', '百度网盘', '百度个人云存储'], classifiers = [ - 'Development Status :: 4 - Beta' + 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', -- GitLab