Skip to content

Commit

Permalink
Make builds reproducible
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Mar 23, 2024
1 parent e8544fb commit 38160f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ version: 1
before:
hooks:
- go mod tidy
-
gomod:
proxy: true
env:
- GOPROXY=https://proxy.golang.org,direct
- GOSUMDB=sum.golang.org

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
ldflags:
- -s -w -X main.version={{.Version}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}

release:
github:
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"github.com/leighmacdonald/steamid/v4/steamid"
)

var version = "dev"

func main() {
if err := run(); err != nil {
slog.Error("error returned", slog.String("error", err.Error()))
Expand All @@ -24,6 +26,8 @@ func main() {
}

func run() error {
slog.Info("Starting tf2bdd", slog.String("version", version))

config, errConfig := readConfig()
if errConfig != nil {
return errConfig
Expand Down

0 comments on commit 38160f4

Please sign in to comment.