Skip to content

Commit

Permalink
new: print build version
Browse files Browse the repository at this point in the history
  • Loading branch information
laaqxdze1k committed Aug 19, 2023
1 parent 9abee61 commit 0220f4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
- windows
- darwin
- ldflags:
- -s -w -X "-extldflags=-static"
- -s -w -X "-extldflags=-static" -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser'
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
Expand Down
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ import (
"os/signal"
)

var (
version = "dev"
commit = "none"
date = "unknown"
)

func main() {
fmt.Printf("immich-go %s, commit %s, built at %s", version, commit, date)
var err error
app := &Application{
Logger: logger.NewLogger(logger.Info),
Expand Down

0 comments on commit 0220f4d

Please sign in to comment.