mirror of https://gitee.com/answerdev/answer.git
Merge branch 'pr/github' into 'main'
Pr/github See merge request opensource/answer!158
This commit is contained in:
commit
f1f20a228c
|
@ -21,4 +21,5 @@ Thumbs*.db
|
||||||
tmp
|
tmp
|
||||||
vendor/
|
vendor/
|
||||||
.husky
|
.husky
|
||||||
answer-data/
|
/answer-data/
|
||||||
|
/answer
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -13,6 +13,13 @@ GO=$(GO_ENV) $(shell which go)
|
||||||
build:
|
build:
|
||||||
@$(GO_ENV) $(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)
|
@$(GO_ENV) $(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)
|
||||||
|
|
||||||
|
# https://dev.to/thewraven/universal-macos-binaries-with-go-1-16-3mm3
|
||||||
|
universal:
|
||||||
|
@GOOS=darwin GOARCH=amd64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_amd64 $(DIR_SRC)
|
||||||
|
@GOOS=darwin GOARCH=arm64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_arm64 $(DIR_SRC)
|
||||||
|
@lipo -create -output ${BIN} ${BIN}_amd64 ${BIN}_arm64
|
||||||
|
@rm -f ${BIN}_amd64 ${BIN}_arm64
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
go get github.com/google/wire/cmd/wire@latest
|
go get github.com/google/wire/cmd/wire@latest
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
@ -23,6 +30,7 @@ test:
|
||||||
|
|
||||||
# clean all build result
|
# clean all build result
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
@$(GO) clean ./...
|
@$(GO) clean ./...
|
||||||
@rm -f $(BIN)
|
@rm -f $(BIN)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue