diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-12-27 17:45:33 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-12-27 17:45:33 +0100 |
commit | 920cb8867d701d0c441165a5de91aee1c8a9ef17 (patch) | |
tree | d3b797e34ffa0f005edf88f64846f4dc28424929 /tools/bin/moon_lib_upload.sh | |
parent | 9dd62ad94b3b7aa2d5c71aefe1b43c108b2c9e6d (diff) |
Update and fix bugs in some tools.
Change-Id: If66fd96dd063f5d2b57094abcc965d37bb8cd92c
Diffstat (limited to 'tools/bin/moon_lib_upload.sh')
-rw-r--r-- | tools/bin/moon_lib_upload.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/bin/moon_lib_upload.sh b/tools/bin/moon_lib_upload.sh new file mode 100644 index 00000000..d2dc2a3f --- /dev/null +++ b/tools/bin/moon_lib_upload.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# usage: moon_update.sh <GPG_ID> + +COMPONENT=$(basename $(pwd)) +GPG_ID=$1 + +if [ -f setup.py ]; then + echo +else + echo "Not a python package" + exit 1 +fi + +VERSION=${COMPONENT}-$(grep __version__ ${COMPONENT}/__init__.py | cut -d "\"" -f 2) + +python3 setup.py sdist bdist_wheel + +echo $COMPONENT +echo $VERSION + +# Instead of "A0A96E75", use your own GPG ID +rm dist/*.asc 2>/dev/null +gpg --detach-sign -u "${GPG_ID}" -a dist/${VERSION}-py3-none-any.whl +gpg --detach-sign -u "${GPG_ID}" -a dist/${VERSION/_/-}.tar.gz +twine upload dist/${VERSION}-py3-none-any.whl dist/${VERSION}-py3-none-any.whl.asc +twine upload dist/${VERSION/_/-}.tar.gz dist/${VERSION/_/-}.tar.gz.asc |