2024-04-23 22:35:08 +00:00
|
|
|
LDFLAGS?=--ldflags '-extldflags "-static"' --ldflags="-X 'main.commit=$(shell git rev-parse HEAD)' -X 'main.version=$(shell git describe --tags)' -X 'main.date=$(shell date '+%Y-%m-%d %T.%s%z')'"
|
2024-05-26 00:56:20 +00:00
|
|
|
export CGO_ENABLED=1
|
2024-03-27 20:46:17 +00:00
|
|
|
|
2024-04-23 22:35:08 +00:00
|
|
|
.PHONY=jx-cli
|
2024-03-27 20:46:17 +00:00
|
|
|
|
2024-04-23 22:35:08 +00:00
|
|
|
build: jx-cli
|
|
|
|
|
|
|
|
jx-cli:
|
2024-04-22 06:24:38 +00:00
|
|
|
go build -o jx $(LDFLAGS) ./cmd/cli/main.go
|
2024-03-27 23:08:13 +00:00
|
|
|
|
2024-04-23 22:35:08 +00:00
|
|
|
test: jx-cli
|
2024-05-06 00:48:54 +00:00
|
|
|
go test -coverprofile=artifacts/coverage.profile ./...
|
|
|
|
go tool cover -html=artifacts/coverage.profile -o artifacts/code-coverage.html
|
2024-05-26 09:05:18 +00:00
|
|
|
|
|
|
|
rpm:
|
|
|
|
rpmbuild -ba build/jx.spec
|