Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaljovec committed Nov 22, 2019
1 parent d6c932f commit 246f239
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions deploy/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
set -e
set -x

# Append the version number with this git commit hash
GIT_HASH=$(git rev-parse --short HEAD)
# Append the version number with this git commit hash, but hashes contain
# letters which are not allowed in pypi versions. We can hack this to replace
# all letters with numbers, this should still be unique enough to not collide
# before the version number increases.
GIT_HASH=$(git rev-parse --short HEAD | tr 'abcdefghijklmnopqrstuvwxyz' '12345678901234567890123456')
awk -v hash=$GIT_HASH '/^__version__ = \"/{ sub(/"$/,".dev"hash"&") }1' topopy/__init__.py > tmp && mv tmp topopy/__init__.py
TEMP_VERSION=$(grep '__version__ = ' topopy/__init__.py | cut -d = -f 2 | sed "s/\"//g" | sed 's/^[ \t]*//;s/[ \t]*$//')
echo $TEMP_VERSION
Expand All @@ -13,8 +16,6 @@ make
python setup.py sdist

# Test the upload
TWINE_USERNAME=__twine__
TWINE_PASSWORD=$PYPI_TOKEN
twine upload --repository-url https://test.pypi.org/legacy/ dist/topopy-${TEMP_VERSION}.tar.gz
twine upload --repository-url https://test.pypi.org/legacy/ -u __twine__ -p $PYPI_TOKEN --non-interactive dist/topopy-${TEMP_VERSION}.tar.gz
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple topopy==TEMP_VERSION
python -c "import topopy"
2 changes: 1 addition & 1 deletion topopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"MergeTree",
"ContourTree",
]
__version__ = "1.0.0.dev69d3314"
__version__ = "1.0.0"

0 comments on commit 246f239

Please sign in to comment.