mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-09 23:53:41 +08:00
fix VERSION
This commit is contained in:
@@ -18,7 +18,7 @@ ADD go.mod go.sum ./
|
|||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=builder /build/build ./web/build
|
COPY --from=builder /build/build ./web/build
|
||||||
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
RUN go build -ldflags "-s -w -X 'new-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func printHelp() {
|
func printHelp() {
|
||||||
fmt.Println("One API " + Version + " - All in one API service for OpenAI API.")
|
fmt.Println("New API " + Version + " - All in one API service for OpenAI API.")
|
||||||
fmt.Println("Copyright (C) 2023 JustSong. All rights reserved.")
|
fmt.Println("Copyright (C) 2023 JustSong. All rights reserved.")
|
||||||
fmt.Println("GitHub: https://github.com/songquanpeng/one-api")
|
fmt.Println("GitHub: https://github.com/songquanpeng/one-api")
|
||||||
fmt.Println("Usage: one-api [--port <port>] [--log-dir <log directory>] [--version] [--help]")
|
fmt.Println("Usage: one-api [--port <port>] [--log-dir <log directory>] [--version] [--help]")
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -27,7 +27,7 @@ var indexPage []byte
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
common.SetupLogger()
|
common.SetupLogger()
|
||||||
common.SysLog("One API " + common.Version + " started")
|
common.SysLog("New API " + common.Version + " started")
|
||||||
if os.Getenv("GIN_MODE") != "debug" {
|
if os.Getenv("GIN_MODE") != "debug" {
|
||||||
gin.SetMode(gin.ReleaseMode)
|
gin.SetMode(gin.ReleaseMode)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user