Skip to content

Commit

Permalink
Fix version for deploy_pip (#56)
Browse files Browse the repository at this point in the history
Similarly to #55:

`SNAPSHOT` in version is replaced with actual commit SHA1 of the repo
  • Loading branch information
vmax authored and haikalpribadi committed Feb 26, 2019
1 parent ba435c2 commit 3fff34b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pip/templates/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export PYTHONPATH="$TWINEPATH:$PKGINFO_PATH:$REQUESTS_PATH:$WEBENCODINGS_PATH:$S

TWINE_BINARY="python $(pwd)/external/*twine*/twine/__main__.py"

GIT_COMMIT_HASH="$(git -C ${BUILD_WORKSPACE_DIRECTORY} rev-parse HEAD)"
sed -i.bak -e "s/SNAPSHOT/$GIT_COMMIT_HASH/g" setup.py && rm -f setup.py.bak

# clean up previous distribution files
rm -fv dist/*
python setup.py sdist
Expand Down

0 comments on commit 3fff34b

Please sign in to comment.