mirror of
https://github.com/jarulsamy/Plex-Bot.git
synced 2024-08-19 15:01:55 +02:00
🎨 Switch to shell scripts for deployment
This commit is contained in:
parent
4aadd886d5
commit
b7ab589f6e
@ -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)
|
||||||
|
@ -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
14
deploy/build.sh
Executable 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
|
@ -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
14
deploy/push.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user