first working version
This commit is contained in:
parent
dc421f035e
commit
84e26d7f6c
50 changed files with 6145 additions and 182 deletions
35
Makefile
Normal file
35
Makefile
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
CC=go
|
||||
BUILD=build -v
|
||||
GCFLAGS=-gcflags '-e'
|
||||
LDFLAGS=-ldflags '-s -w'
|
||||
PROGRAM=duckycode
|
||||
ENV=CGO_ENABLED=0
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): clean codeqa
|
||||
$(ENV) $(CC) $(BUILD) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
$(CC) clean -x
|
||||
|
||||
codeqa: generate gofmt test
|
||||
|
||||
generate:
|
||||
$(CC) generate
|
||||
|
||||
gofmt:
|
||||
gofmt -w pkg/ main.go
|
||||
|
||||
test:
|
||||
ifeq ($(shell go env GOARCH), $(shell go env GOHOSTARCH))
|
||||
ifeq ($(shell go env GOOS), $(shell go env GOHOSTOS))
|
||||
$(CC) test ./...
|
||||
else
|
||||
$(info skipping tests of other platforms)
|
||||
endif
|
||||
else
|
||||
$(info skipping tests of other platforms)
|
||||
endif
|
||||
|
||||
.PHONY: vendor build clean codeqa generate gofmt test
|
||||
Loading…
Add table
Add a link
Reference in a new issue