forked from namsral/flag
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgo.mk
More file actions
20 lines (17 loc) · 716 Bytes
/
go.mk
File metadata and controls
20 lines (17 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This file is only necessary to include for Go projects.
# Must be included AFTER variables.mk
GO_LDFLAGS := "-w -s \
-X github.com/jnovack/release.Application=${APPLICATION} \
-X github.com/jnovack/release.BuildRFC3339=${BUILD_RFC3339} \
-X github.com/jnovack/release.Package=${PACKAGE} \
-X github.com/jnovack/release.Revision=${REVISION} \
-X github.com/jnovack/release.Version=${VERSION} \
"
# go-build builds your flagship application
.PHONY: go-build
go-build:
go build -ldflags $(GO_LDFLAGS) cmd/${APPLICATION}/main.go
# go-update forces sum.golang.go and pkg.go.dev to update your repository version
.PHONY: go-update
go-update:
curl https://sum.golang.org/lookup/github.com/${PACKAGE}@${VERSION}