mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
close #186
This commit is contained in:
parent
b7887ed162
commit
1234ee32e4
@ -7,7 +7,8 @@ RUN apk add --no-cache git
|
||||
RUN go get ./...
|
||||
|
||||
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager
|
||||
RUN go install
|
||||
RUN go build -ldflags "-X main.version=$(git tag -l --points-at HEAD)"
|
||||
RUN mv filemanager /go/bin/filemanager
|
||||
|
||||
FROM alpine:latest
|
||||
COPY --from=0 /go/bin/filemanager /usr/local/bin/filemanager
|
||||
|
@ -87,10 +87,13 @@ func setupViper() {
|
||||
}
|
||||
|
||||
func printVersion() {
|
||||
version = strings.TrimSpace(version)
|
||||
|
||||
if version == "" {
|
||||
fmt.Println("filemanager is at an untracked version")
|
||||
} else {
|
||||
fmt.Println("filemanager", version)
|
||||
version = strings.TrimPrefix(version, "v")
|
||||
fmt.Println("filemanager version", version)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user