From e8a1e9e0148d926d4b4b996f9e457f7b90e0737d Mon Sep 17 00:00:00 2001 From: langhuihui <178529795@qq.com> Date: Tue, 20 May 2025 09:36:11 +0800 Subject: [PATCH] fix: docker build --- Dockerfile | 3 ++- plugin.go | 2 +- scripts/retag.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b351a2f..3ea7606 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,5 @@ COPY example/default/config.yaml /etc/monibuca/config.yaml EXPOSE 6000 8080 8443 1935 554 5060 9000-20000 EXPOSE 5060/udp 44944/udp -CMD [ "./monibuca_linux", "-c", "/etc/monibuca/config.yaml" ] +ENTRYPOINT [ "./monibuca_linux"] +CMD ["-c", "/etc/monibuca/config.yaml"] diff --git a/plugin.go b/plugin.go index 61421b2..3feb62e 100644 --- a/plugin.go +++ b/plugin.go @@ -406,7 +406,7 @@ func (t *WebHookTask) Start() error { return nil } -func (t *WebHookTask) Run() error { +func (t *WebHookTask) Go() error { req, err := http.NewRequest(t.conf.Method, t.conf.URL, bytes.NewBuffer(t.jsonData)) if err != nil { return err diff --git a/scripts/retag.sh b/scripts/retag.sh index d729e63..6691077 100644 --- a/scripts/retag.sh +++ b/scripts/retag.sh @@ -1,6 +1,6 @@ #!/bin/sh # 获取最新的 tag -LATEST_TAG=$(git describe --tags --abbrev=0) +LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) if [ -z "$LATEST_TAG" ]; then echo "没有找到任何 tag."