Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b6726096
authored
Dec 21, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix VERSION
parent
8bdda29c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Dockerfile
+1
-1
common/init.go
+1
-1
main.go
+1
-1
No files found.
Dockerfile
View file @
b6726096
...
...
@@ -18,7 +18,7 @@ ADD go.mod go.sum ./
RUN
go mod download
COPY
. .
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
...
...
common/init.go
View file @
b6726096
...
...
@@ -16,7 +16,7 @@ var (
)
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
(
"GitHub: https://github.com/songquanpeng/one-api"
)
fmt
.
Println
(
"Usage: one-api [--port <port>] [--log-dir <log directory>] [--version] [--help]"
)
...
...
main.go
View file @
b6726096
...
...
@@ -27,7 +27,7 @@ var indexPage []byte
func
main
()
{
common
.
SetupLogger
()
common
.
SysLog
(
"
One
API "
+
common
.
Version
+
" started"
)
common
.
SysLog
(
"
New
API "
+
common
.
Version
+
" started"
)
if
os
.
Getenv
(
"GIN_MODE"
)
!=
"debug"
{
gin
.
SetMode
(
gin
.
ReleaseMode
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment