From 8d50e73d139118667e2304e5fca3f3725d38447e Mon Sep 17 00:00:00 2001 From: Hai Liang Wang Date: Sun, 3 Jan 2021 11:48:12 +0800 Subject: [PATCH] Update publish script to release new version in pypi.org --- scripts/pypi.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/pypi.sh b/scripts/pypi.sh index 71059da..69056ec 100755 --- a/scripts/pypi.sh +++ b/scripts/pypi.sh @@ -1,6 +1,6 @@ #! /bin/bash ########################################### -# publish package to pypi +# ########################################### # constants @@ -13,4 +13,16 @@ export PATH=/opt/miniconda3/envs/venv-py3/bin:$PATH # main [ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return cd $baseDir/.. -python setup.py upload -r pypi + +if [ ! -d tmp ]; then + mkdir tmp +fi + +if [ -f synonyms/data/words.vector.gz ]; then + echo "Move pkg to tmp" + mv synonyms/data/words.vector.gz tmp +fi + +rm -rf ./dist/* +python setup.py sdist upload -r pypi +mv tmp/words.vector.gz synonyms/data/words.vector.gz \ No newline at end of file