mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
35 lines
848 B
YAML
35 lines
848 B
YAML
|
version: "3"
|
||
|
|
||
|
vars:
|
||
|
BINARY: sonrd
|
||
|
BUILD_FLAGS: -mod=readonly -trimpath
|
||
|
BUILD_TAGS: netgo,ledger
|
||
|
COMMIT:
|
||
|
sh: git rev-parse HEAD
|
||
|
VERSION:
|
||
|
sh: git describe --tags --always
|
||
|
|
||
|
tasks:
|
||
|
build:
|
||
|
desc: Build the sonrd binary
|
||
|
cmds:
|
||
|
- >
|
||
|
go build
|
||
|
{{.BUILD_FLAGS}}
|
||
|
-tags "{{.BUILD_TAGS}}"
|
||
|
-ldflags "
|
||
|
-X github.com/cosmos/cosmos-sdk/version.Name=sonr
|
||
|
-X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
|
||
|
-X github.com/cosmos/cosmos-sdk/version.Version={{.VERSION}}
|
||
|
-X github.com/cosmos/cosmos-sdk/version.Commit={{.COMMIT}}
|
||
|
-X github.com/cosmos/cosmos-sdk/version.BuildTags={{.BUILD_TAGS}}
|
||
|
"
|
||
|
-o ./build/{{.BINARY}}
|
||
|
./cmd/sonrd
|
||
|
env:
|
||
|
CGO_ENABLED: 1
|
||
|
GOARCH:
|
||
|
sh: go env GOARCH
|
||
|
GOOS:
|
||
|
sh: go env GOOS
|