🎨 Switch to shell scripts for deployment

This commit is contained in:
Joshua Arulsamy 2020-08-10 02:16:11 -06:00
parent 4aadd886d5
commit b7ab589f6e
5 changed files with 33 additions and 18 deletions

View File

@ -1,2 +1,5 @@
"""Track version number of package""" """Track version number of package."""
VERSION = "0.0.6" VERSION = "0.0.7"
if __name__ == "__main__":
print(VERSION)

View File

@ -1,8 +0,0 @@
import os
import sys
sys.path.append("PlexBot")
from __version__ import VERSION
sys.exit(os.system(f"docker build -t jarulsamy/plex-bot:{VERSION} ."))

14
deploy/build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
VERSION=$(python PlexBot/__version__.py)
docker build -t "jarulsamy/plex-bot:$VERSION" .
if [ $? -eq 0 ]
then
echo "Successfully build docker image."
exit 0
else
echo "Failed to build docker image." >&2
exit 1
fi

View File

@ -1,8 +0,0 @@
import os
import sys
sys.path.append("PlexBot")
from __version__ import VERSION
sys.exit(os.system(f"docker push jarulsamy/plex-bot:{VERSION}"))

14
deploy/push.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
VERSION=$(python PlexBot/__version__.py)
docker push "jarulsamy/plex-bot:$VERSION"
if [ $? -eq 0 ]
then
echo "Successfully pushed docker image."
exit 0
else
echo "Failed to push docker image." >&2
exit 1
fi