aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/bin/delete_orchestrator.sh2
-rw-r--r--tools/bin/moon_lib_update.sh43
-rw-r--r--tools/bin/moon_lib_upload.sh27
3 files changed, 28 insertions, 44 deletions
diff --git a/tools/bin/delete_orchestrator.sh b/tools/bin/delete_orchestrator.sh
index 95fcfddd..9b531e22 100644
--- a/tools/bin/delete_orchestrator.sh
+++ b/tools/bin/delete_orchestrator.sh
@@ -2,7 +2,7 @@
set +x
-kubectl delete -n moon -f kubernetes/templates/moon_orchestrator.yaml
+kubectl delete -n moon -f tools/moon_kubernetes/templates/moon_orchestrator.yaml
for i in $(kubectl get deployments -n moon | grep wrapper | cut -d " " -f 1 | xargs); do
kubectl delete deployments/$i -n moon;
done
diff --git a/tools/bin/moon_lib_update.sh b/tools/bin/moon_lib_update.sh
deleted file mode 100644
index 3925e336..00000000
--- a/tools/bin/moon_lib_update.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-# usage: moon_update.sh {build,upload,copy} {python_moondb,python_moonutilities} <GPG_ID>
-
-CMD=$1
-COMPONENT=$2
-GPG_ID=$3
-
-VERSION=${COMPONENT}-$(grep __version__ ${COMPONENT}/${COMPONENT}/__init__.py | cut -d "\"" -f 2)
-
-cd ${COMPONENT}
-
-python3 setup.py sdist bdist_wheel
-
-if [ "$CMD" = "upload" ]; then
- # 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
-fi
-
-rm -f ../moon_manager/dist/${COMPONENT}*
-rm -f ../moon_orchestrator/dist/${COMPONENT}*
-rm -f ../moon_wrapper/dist/${COMPONENT}*
-rm -f ../moon_interface/dist/${COMPONENT}*
-rm -f ../moon_authz/dist/${COMPONENT}*
-
-
-if [ "$CMD" = "copy" ]; then
- mkdir -p ../moon_manager/dist/ 2>/dev/null
- cp -v dist/${VERSION}-py3-none-any.whl ../moon_manager/dist/
- mkdir -p ../moon_orchestrator/dist/ 2>/dev/null
- cp -v dist/${VERSION}-py3-none-any.whl ../moon_orchestrator/dist/
- mkdir -p ../moon_wrapper/dist/ 2>/dev/null
- cp -v dist/${VERSION}-py3-none-any.whl ../moon_wrapper/dist/
- mkdir -p ../moon_interface/dist/ 2>/dev/null
- cp -v dist/${VERSION}-py3-none-any.whl ../moon_interface/dist/
- mkdir -p ../moon_authz/dist/ 2>/dev/null
- cp -v dist/${VERSION}-py3-none-any.whl ../moon_authz/dist/
-fi
-
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