Fix missing rustc

This commit is contained in:
askiiart 2023-10-31 18:15:57 -05:00
parent d58f2b1bb2
commit 5e34e60a97
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
4 changed files with 6 additions and 3 deletions

View file

@ -14,9 +14,10 @@ steps:
- apt-get update
- apt-get install binutils -y
- pip install pyinstaller
- apt update && apt install rustc -y
- cd /drone/src && pip install -r requirements.txt && pyinstaller main.py
- chmod 777 /drone/src/dist/main/main
- cd /drone/src/dist/main && tar cvfz /drone/src/AlwaysDungeons.tar.gz *
- cd /drone/src/dist/main && tar cvfz /drone/src/AlwaysDungeons.tar.gz *
- name: build and publish
image: plugins/docker
pull: always

View file

@ -1,4 +1,5 @@
FROM python:slim-bookworm
WORKDIR /data
RUN apt update && apt install -y rust-all
ADD AlwaysDungeons.tar.gz /data
CMD ["/data/main"]

View file

@ -5,15 +5,16 @@ ORG="askiiart"
NAME="discord-always-dungeons"
PUSH="false"
# Apply patch for Docker
git apply docker.patch
# Build image
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 *"
docker run -v .:/repo python /bin/sh -c "apt update && apt install -y rustc && 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)
# Could just do -t on the build, but this makes it easier to expand if needed.
if [ $ID == "true" ]; then
if [ $ID == "true" && $PUSH="true" ]; then
docker tag ${ID} ${ORG}/${NAME}:latest
docker push ${ORG}/${NAME}:latest
else

0
generate.sh Normal file
View file