Skip to content

Commit

Permalink
Merge pull request #507 from CSUSTers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
icceey authored Dec 24, 2024
2 parents d8d20a5 + 78b80f6 commit 0e6b4c2
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 96 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ fabric.properties
data/

.vscode/
.idea/

# output
got
Expand All @@ -126,3 +127,4 @@ csust-got.exe
a.http
.idea/GitLink.xml
dictionary.txt
/logs
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ ARG BRANCH
ARG TAG
ARG RELEASE

WORKDIR /go/src/app
COPY . .
RUN make deps

ENV BRANCH=$BRANCH
ENV TAG=$TAG
ENV GOARCH=$TARGETARCH

WORKDIR /go/src/app
COPY . .
RUN make deploy


# deploy image
FROM --platform=$BUILDPLATFORM alpine

RUN apk add --no-cache tzdata
COPY --from=hugefiver/ffmpeg:7.0.1-2 /ffmpeg /usr/local/bin/ffmpeg
COPY --from=hugefiver/ffmpeg:7.1 /ffmpeg /usr/local/bin/ffmpeg
# COPY --from=hugefiver/ffmpeg:7.0.1 /ffprobe /usr/local/bin/ffprobe

WORKDIR /app
Expand Down
8 changes: 8 additions & 0 deletions base/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ func Info(ctx Context) error {
msg += fmt.Sprintf("Build Time: %s\n", buildTime)
msg += fmt.Sprintf("Last Boot: %s\n", lastBoot)
msg += fmt.Sprintf("Go Version: %s\n", runtime.Version())
if ctx.Bot().URL != DefaultApiURL {
msg += "API Server: CUSTOM\n"
} else {
msg += "API Server: OFFICIAL\n"
}
if config.BotConfig.DebugMode {
msg += "Debug Mode: YES\n"
}
msg += "```"

return ctx.Send(msg, ModeMarkdownV2)
Expand Down
Loading

0 comments on commit 0e6b4c2

Please sign in to comment.