alwaysdungeons/build-and-push.sh

16 lines
595 B
Bash
Raw Normal View History

2023-08-28 21:00:35 -05:00
#!/usr/bin/env bash
set -e
ORG="askiiart"
NAME="discord-always-dungeons"
# Apply patch for Docker
2023-09-06 15:01:08 -05:00
git apply docker.patch
# Build image
2023-09-06 15:01:08 -05:00
docker run -v .:/repo python /bin/sh -c "cd /repo && pip install -r requirements.txt && apt-get update && apt-get install binutils -y && pip install pyinstaller && pyinstaller main.py && cd /repo/dist/main && chmod -R 777 /repo/dist/main && tar cvfz /repo/AlwaysDungeons.tar.gz *"
ID=$(docker build . -q)
2023-08-28 21:00:35 -05:00
# Could just do -t on the build, but this makes it easier to expand if needed.
2023-09-06 15:01:08 -05:00
docker tag ${ID} ${ORG}/${NAME}:latest
docker push ${ORG}/${NAME}:latest