2022-09-08 11:27:05 +00:00
|
|
|
before:
|
|
|
|
hooks:
|
|
|
|
- go mod tidy
|
2022-05-13 15:43:54 +00:00
|
|
|
builds:
|
|
|
|
- env:
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
|
|
|
flags:
|
|
|
|
- -trimpath
|
|
|
|
ldflags:
|
|
|
|
- '-s -w'
|
Include build information and add version command (#194)
Includes relevant fields listed on
https://goreleaser.com/customization/templates/ into build artifacts.
The version command outputs the version by default:
```
$ bricks version
0.0.21-devel
```
Or all build information if `--json` is specified:
```
$ bricks version --json
{
"ProjectName": "bricks",
"Version": "0.0.21-devel",
"Branch": "version-info",
"Tag": "v0.0.20",
"ShortCommit": "193b56b",
"FullCommit": "193b56b0929128c0836d35e913c46fd66fa2a93c",
"CommitTime": "2023-02-02T22:04:42+01:00",
"Summary": "v0.0.20-5-g193b56b",
"Major": 0,
"Minor": 0,
"Patch": 20,
"Prerelease": "",
"IsSnapshot": true,
"BuildTime": "2023-02-02T22:07:36+01:00"
}
```
2023-02-03 14:38:53 +00:00
|
|
|
- -X github.com/databricks/bricks/internal/build.buildProjectName={{ .ProjectName }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildVersion={{ .Version }}
|
|
|
|
|
|
|
|
# Git information
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildBranch={{ .Branch }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildTag={{ .Tag }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildShortCommit={{ .ShortCommit }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildFullCommit={{ .FullCommit }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildCommitTimestamp={{ .CommitTimestamp }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildSummary={{ .Summary }}
|
|
|
|
|
|
|
|
# Version information
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildMajor={{ .Major }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildMinor={{ .Minor }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildPatch={{ .Patch }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildPrerelease={{ .Prerelease }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildIsSnapshot={{ .IsSnapshot }}
|
|
|
|
- -X github.com/databricks/bricks/internal/build.buildTimestamp={{ .Timestamp }}
|
|
|
|
|
2022-05-13 15:43:54 +00:00
|
|
|
goos:
|
|
|
|
- windows
|
|
|
|
- linux
|
|
|
|
- darwin
|
|
|
|
goarch:
|
|
|
|
- amd64
|
|
|
|
- arm64
|
2022-09-09 08:31:41 +00:00
|
|
|
- '386'
|
|
|
|
ignore:
|
|
|
|
- goos: darwin
|
|
|
|
goarch: '386'
|
|
|
|
- goos: linux
|
|
|
|
goarch: '386'
|
2023-01-03 11:15:21 +00:00
|
|
|
binary: '{{ .ProjectName }}'
|
2022-05-13 15:43:54 +00:00
|
|
|
archives:
|
|
|
|
- format: zip
|
|
|
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
|
|
|
checksum:
|
|
|
|
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
|
|
|
algorithm: sha256
|
|
|
|
snapshot:
|
2023-02-20 14:46:57 +00:00
|
|
|
name_template: '{{ incpatch .Version }}-dev+{{ .ShortCommit }}'
|
2022-05-13 15:43:54 +00:00
|
|
|
changelog:
|
|
|
|
sort: asc
|
|
|
|
filters:
|
|
|
|
exclude:
|
|
|
|
- '^docs:'
|
|
|
|
- '^test:'
|