diff --git a/PlexBot/__version__.py b/PlexBot/__version__.py index e2acb55..8f25dfd 100644 --- a/PlexBot/__version__.py +++ b/PlexBot/__version__.py @@ -1,2 +1,5 @@ -"""Track version number of package""" -VERSION = "0.0.6" +"""Track version number of package.""" +VERSION = "0.0.7" + +if __name__ == "__main__": + print(VERSION) diff --git a/deploy/build.py b/deploy/build.py deleted file mode 100644 index 78c9326..0000000 --- a/deploy/build.py +++ /dev/null @@ -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} .")) diff --git a/deploy/build.sh b/deploy/build.sh new file mode 100755 index 0000000..9fe1c36 --- /dev/null +++ b/deploy/build.sh @@ -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 diff --git a/deploy/push.py b/deploy/push.py deleted file mode 100755 index 98fc956..0000000 --- a/deploy/push.py +++ /dev/null @@ -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}")) diff --git a/deploy/push.sh b/deploy/push.sh new file mode 100755 index 0000000..ce37735 --- /dev/null +++ b/deploy/push.sh @@ -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