diff options
author | 2017-11-28 16:05:46 +0100 | |
---|---|---|
committer | 2017-11-28 16:05:46 +0100 | |
commit | d72e7ce30ebc098a6832b32d1a1155b1a7efd51c (patch) | |
tree | f138415024cb759cac099202546376ed632c1137 /moonv4/bin | |
parent | ea4391a6ba0d2616a44f11b4ccdb2e1b4a3d2f2c (diff) |
moon_utilities python unit test
Change-Id: Ia3e52d778ce2aba7f6ae1df727606dd40d3be480
Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4/bin')
-rw-r--r-- | moonv4/bin/README.md | 5 | ||||
-rw-r--r-- | moonv4/bin/moon_utilities_update.sh | 35 |
2 files changed, 40 insertions, 0 deletions
diff --git a/moonv4/bin/README.md b/moonv4/bin/README.md new file mode 100644 index 00000000..3125c468 --- /dev/null +++ b/moonv4/bin/README.md @@ -0,0 +1,5 @@ +# Automated Tools/Scripts + +## moon_utilities_update +- update moon_utilities to PIP: `./moon_utilities_update.sh upload` +- locally update moon_utilities for each moon Python package: `./moon_utilities_update.sh copy`
\ No newline at end of file diff --git a/moonv4/bin/moon_utilities_update.sh b/moonv4/bin/moon_utilities_update.sh new file mode 100644 index 00000000..9dc42179 --- /dev/null +++ b/moonv4/bin/moon_utilities_update.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +VERSION=moon_utilities-$(grep __version__ moon_utilities/__init__.py | cut -d "\"" -f 2) + +python3 setup.py sdist bdist_wheel + +if [ "$1" = "upload" ]; then + # Instead of "A0A96E75", use your own GPG ID + rm dist/*.asc 2>/dev/null + gpg --detach-sign -u "A0A96E75" -a dist/${VERSION}-py3-none-any.whl + gpg --detach-sign -u "A0A96E75" -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/moon_utilities* +rm -f ../moon_orchestrator/dist/moon_utilities* +rm -f ../moon_wrapper/dist/moon_utilities* +rm -f ../moon_interface/dist/moon_utilities* +rm -f ../moon_authz/dist/moon_utilities* + + +if [ "$1" = "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 + |