2019-11-18 09:24:26 +03:00
|
|
|
rp:
|
|
|
|
go build -ldflags "-X main.gitCommit=$(shell git rev-parse --short HEAD)$(shell [[ $$(git status --porcelain) = "" ]] || echo -dirty)" ./cmd/rp
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f rp
|
|
|
|
|
|
|
|
image:
|
|
|
|
go get github.com/openshift/imagebuilder/cmd/imagebuilder
|
|
|
|
imagebuilder -f Dockerfile -t rp:latest .
|
|
|
|
|
2019-11-30 03:53:25 +03:00
|
|
|
test:
|
|
|
|
go generate ./...
|
|
|
|
go build ./...
|
|
|
|
|
|
|
|
gofmt -s -w cmd hack pkg
|
|
|
|
go run ./vendor/golang.org/x/tools/cmd/goimports -w -local=github.com/jim-minter/rp cmd hack pkg
|
2019-11-27 08:17:52 +03:00
|
|
|
go run ./hack/validate-imports/validate-imports.go cmd hack pkg
|
2019-11-30 03:53:25 +03:00
|
|
|
@[ -z "$$(ls pkg/util/*.go 2>/dev/null)" ] || (echo error: go files are not allowed in pkg/util, use a subpackage; exit 1)
|
|
|
|
@[ -z "$$(find -name "*:*")" ] || (echo error: filenames with colons are not allowed on Windows, please rename; exit 1)
|
|
|
|
|
|
|
|
go vet ./...
|
2019-11-21 05:32:34 +03:00
|
|
|
go test ./...
|
|
|
|
|
2019-11-30 03:53:25 +03:00
|
|
|
.PHONY: rp clean image test
|