代码拉取完成,页面将自动刷新
同步操作将从 游益锋/百度网盘的Python客户端 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
# !!! RUN THIS SCRIPT UNDER VIRTUALENV !!!
# need to run the following commands before running this release script
# (This is for macOS, and for python virtualenv is recommended)
# --------
# brew install pandoc
# pip3 install pandoc pypandoc twine pyflakes
### Usage ###
# - Testing: ./release.sh -buti
# - Actual: ./release.sh -abigtu
#set -o errexit
#set -x
trap "echo '=== Release script interrupted ==='; exit -1" SIGINT
check() {
command -v "$1" || { echo "'$1' doesn't exist, aborting."; exit -1; }
}
check git
check python
check pandoc
check pyflakes
check twine
check jq
pycmd=python
actual=0
build=0
install=0
upload=0
testit=0
tagit=0
parsearg() {
while getopts "abigtu" opt; do
case "$opt" in
a)
actual=1
;;
b)
build=1
;;
u)
upload=1
;;
i)
install=1
;;
t)
testit=1
;;
g)
tagit=1
;;
esac
done
}
runtest() {
eval $pycmd -m pyflakes bypy
eval $pycmd setup.py test
#eval $pycmd -m doctest -v bypy.py
eval $pycmd -m bypy -V
eval $pycmd -m bypy --config-dir bypy/test/configdir quota
}
installtest() {
# due to requests not in testpypi
if [ $actual -eq 0 ]
then
pip install requests
else
pip uninstall -y requests
fi
pip uninstall -y bypy
pip install -U bypy $indexopt
bypy -V
bypy --config-dir bypy/test/configdir quota
}
main() {
./syncver.sh
eval $pycmd genrst.py
parsearg $*
if [ "$actual" -eq 0 ]
then
repoopt="-r testpypi"
indexopt="-i https://testpypi.python.org/simple/"
else
repoopt=""
indexopt=""
fi
if [ "$tagit" -eq 1 ]
then
bypyversion=`grep __version__ bypy/const.py | sed -e "s/__version__ *= *'//g" -e "s/'//g"`
git tag
git tag "$bypyversion"
git push
git push --tags
git tag
fi
if [ "$testit" -eq 1 ]
then
runtest
fi
if [ "$build" -eq 1 ]
then
rm -Rf dist/*
eval $pycmd setup.py bdist_wheel #sdist
fi
uploadcmd="twine upload dist/* $repoopt"
if [ "$upload" -eq 0 ]
then
echo "$uploadcmd"
else
eval "$uploadcmd"
fi
if [ "$install" -eq 1 ]
then
installtest
fi
}
main $*
# vim: tabstop=4 noexpandtab shiftwidth=4 softtabstop=4 ff=unix fileencoding=utf-8
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。