Build osu with version argument

This commit is contained in:
Simon Bruder 2020-08-25 13:29:27 +02:00
parent ad15a2a516
commit 49c3bf282b
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 9 additions and 13 deletions

View file

@ -10,8 +10,14 @@ ARG CACHEBUST=1
RUN OSU_VERSION=$(curl -s https://api.github.com/repos/ppy/osu/releases/latest | jq -r .tag_name) \ RUN OSU_VERSION=$(curl -s https://api.github.com/repos/ppy/osu/releases/latest | jq -r .tag_name) \
&& git clone --depth=1 --single-branch -b ${OSU_VERSION} https://github.com/ppy/osu \ && git clone --depth=1 --single-branch -b ${OSU_VERSION} https://github.com/ppy/osu \
&& cd osu \ && cd osu \
&& dotnet publish -c Release -r linux-x64 --self-contained true -o /opt/osu/ osu.Desktop /p:PublishTrimmed=true \ && dotnet publish \
&& echo "Version ${OSU_VERSION}, Built on $(date '+%Y-%m-%d %H:%M')" > /opt/osu/version -c Release \
-r linux-x64 \
--self-contained true \
-o /opt/osu/ \
-p:PublishTrimmed=true \
-p:Version=${OSU_VERSION} \
osu.Desktop
FROM mcr.microsoft.com/dotnet/core/runtime-deps FROM mcr.microsoft.com/dotnet/core/runtime-deps
@ -29,6 +35,4 @@ COPY --from=builder /opt/osu/ /opt/osu/
RUN adduser --disabled-password --gecos '' osu RUN adduser --disabled-password --gecos '' osu
USER osu USER osu
COPY entrypoint.sh /usr/local/bin/ ENTRYPOINT ["/opt/osu/osu!"]
ENTRYPOINT ["entrypoint.sh"]

View file

@ -1,8 +0,0 @@
#!/bin/sh
cat << EOF
┏━┓┏━┓╻ ╻╻
┃ ┃┗━┓┃ ┃╹
┗━┛┗━┛┗━┛╹
EOF
cat /opt/osu/version
exec /opt/osu/osu!