mirror of
https://github.com/activecm/rita
synced 2026-06-08 13:02:45 +00:00
309171c9aa
* simplified installer, removed ansible and remote installs, updated ci * Update ci.yml
32 lines
817 B
Makefile
32 lines
817 B
Makefile
VERSION := $(shell git describe --always --abbrev=0 --tags)
|
|
|
|
LDFLAGS := -ldflags='-X main.Version=$(VERSION) -extldflags "-static"'
|
|
CGO_ENABLED ?= 0
|
|
GOARCH ?= $(shell go env GOARCH)
|
|
GOOS ?= $(shell go env GOOS)
|
|
|
|
.PHONY: build test test-unit test-integration test-database test-cmd test-viewer clean
|
|
|
|
build:
|
|
CGO_ENABLED=$(CGO_ENABLED) GOARCH=$(GOARCH) GOOS=$(GOOS) go build $(LDFLAGS) -o rita
|
|
|
|
test: test-unit test-integration test-database test-cmd test-viewer
|
|
|
|
test-unit:
|
|
go test --cover $$(go list ./... | grep -v /integration | grep -v /database | grep -v /cmd | grep -v /viewer)
|
|
|
|
test-integration:
|
|
go test ./integration/... -timeout 1800s
|
|
|
|
test-database:
|
|
go test ./database/... -timeout 1800s
|
|
|
|
test-cmd:
|
|
go test ./cmd/... -timeout 1800s
|
|
|
|
test-viewer:
|
|
go test ./viewer/... -timeout 1800s
|
|
|
|
clean:
|
|
rm -f rita
|