Merge branch 'pr/github' into 'main'

Pr/github

See merge request opensource/answer!158
This commit is contained in:
linkinstar 2022-11-02 06:17:05 +00:00
commit f1f20a228c
2 changed files with 10 additions and 1 deletions

3
.gitignore vendored
View File

@ -21,4 +21,5 @@ Thumbs*.db
tmp tmp
vendor/ vendor/
.husky .husky
answer-data/ /answer-data/
/answer

View File

@ -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)