Skip to content

Commit

Permalink
Update publish script to release new version in pypi.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Liang Wang committed Jan 3, 2021
1 parent e829bf8 commit 8d50e73
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions scripts/pypi.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash
###########################################
# publish package to pypi
#
###########################################

# constants
Expand All @@ -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

0 comments on commit 8d50e73

Please sign in to comment.