From a57f327ca6760f12fd14a7f3a99a7e862955aaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Tom=C5=A1i=C4=8D?= Date: Tue, 16 Jul 2024 13:02:34 +0200 Subject: [PATCH] Update Dockerfile --- Dockerfile.ci | 11 +++++++---- build.sh | 1 + custompuppet.go | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile.ci b/Dockerfile.ci index 46e5afe..832d9c9 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -18,12 +18,15 @@ RUN curl -sSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_ ARG EXECUTABLE=./mautrix-imessage COPY $EXECUTABLE /usr/bin/mautrix-imessage -COPY ./example-config.yaml /opt/mautrix-imessage/example-config.yaml -COPY ./docker-run.sh /docker-run.sh +#COPY ./example-config.yaml /opt/mautrix-imessage/example-config.yaml +#COPY ./docker-run.sh /docker-run.sh # Ensure the entrypoint script is executable -RUN chmod +x /docker-run.sh /usr/bin/mautrix-imessage +#RUN chmod +x /docker-run.sh /usr/bin/mautrix-imessage VOLUME /data -CMD ["/docker-run.sh"] +#CMD ["/docker-run.sh"] +#CMD ["/usr/bin/mautrix-imessage -c /config/config.yaml -r /config/registration.yaml"] +ENTRYPOINT [ "/usr/bin/mautrix-imessage", "-n" ] +CMD [ "-c", "/config/config.yaml", "-r", "/config/registration.yaml" ] diff --git a/build.sh b/build.sh index 42892ad..fe8e9a8 100755 --- a/build.sh +++ b/build.sh @@ -15,3 +15,4 @@ if [[ -f "$HEIF_PATH/libheif.1.dylib" ]]; then fi go build -o mautrix-imessage -tags "$build_tags" -ldflags "-X main.Tag=$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$(git rev-parse HEAD) -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'" "$@" +echo $? diff --git a/custompuppet.go b/custompuppet.go index 7c4b5ff..ee16ee1 100644 --- a/custompuppet.go +++ b/custompuppet.go @@ -67,7 +67,7 @@ func (user *User) StartCustomMXID(reloginOnFail bool) error { func (user *User) tryAutomaticDoublePuppeting() { user.zlog.Debug().Msg("Trying to automatically enable double puppet") - secret:= user.bridge.Config.GetDoublePuppetSecret(user.MXID) + secret := user.bridge.Config.GetDoublePuppetSecret(user.MXID) user.zlog.Debug().Str("secret", secret).Msg("Got secret") if !user.bridge.Config.CanAutoDoublePuppet(user.MXID) || user.DoublePuppetIntent != nil { user.zlog.Debug().Msg("Automatic double puppeting not enabled")