aboutsummaryrefslogtreecommitdiffstats
path: root/old/tools/bin/moon_lib_upload.sh
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2020-06-03 10:06:52 +0200
committerThomas Duval <thomas.duval@orange.com>2020-06-03 10:06:52 +0200
commit7bb53c64da2dcf88894bfd31503accdd81498f3d (patch)
tree4310e12366818af27947b5e2c80cb162da93a4b5 /old/tools/bin/moon_lib_upload.sh
parentcbea4e360e9bfaa9698cf7c61c83c96a1ba89b8c (diff)
Update to new version 5.4HEADstable/jermamaster
Signed-off-by: Thomas Duval <thomas.duval@orange.com> Change-Id: Idcd868133d75928a1ffd74d749ce98503e0555ea
Diffstat (limited to 'old/tools/bin/moon_lib_upload.sh')
-rw-r--r--old/tools/bin/moon_lib_upload.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/old/tools/bin/moon_lib_upload.sh b/old/tools/bin/moon_lib_upload.sh
new file mode 100644
index 00000000..d2dc2a3f
--- /dev/null
+++ b/old/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