Merge pull request #215 from meshplus/fix/makefile

fix(*): update Makefile
This commit is contained in:
Aiden X 2020-10-23 10:42:50 +08:00 committed by GitHub
commit c96b0ddf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -49,22 +49,34 @@ tester:
## make install: Go install the project ## make install: Go install the project
install: install:
cd internal/repo && packr cd internal/repo && packr
$(GO) install -tags '${TAGS}' -ldflags '${GOLDFLAGS}' -modfile go${TAGS}.mod ./cmd/${APP_NAME} $(GO) install -ldflags '${GOLDFLAGS}' ./cmd/${APP_NAME}
@printf "${GREEN}Build bitxhub successfully!${NC}\n" @printf "${GREEN}Install bitxhub successfully!${NC}\n"
build: build:
cd internal/repo && packr cd internal/repo && packr
@mkdir -p bin @mkdir -p bin
$(GO) build -tags '${TAGS}' -ldflags '${GOLDFLAGS}' -modfile go${TAGS}.mod ./cmd/${APP_NAME} $(GO) build -ldflags '${GOLDFLAGS}' ./cmd/${APP_NAME}
@mv ./bitxhub bin @mv ./bitxhub bin
@printf "${GREEN}Build bitxhub successfully!${NC}\n" @printf "${GREEN}Build bitxhub successfully!${NC}\n"
installent:
cd internal/repo && packr
$(GO) install -tags ent -ldflags '${GOLDFLAGS}' -modfile goent.mod ./cmd/${APP_NAME}
@printf "${GREEN}Install bitxhub ent successfully!${NC}\n"
buildent:
cd internal/repo && packr
@mkdir -p bin
$(GO) build -tags ent -ldflags '${GOLDFLAGS}' -modfile goent.mod ./cmd/${APP_NAME}
@mv ./bitxhub bin
@printf "${GREEN}Build bitxhub ent successfully!${NC}\n"
## make linter: Run golanci-lint ## make linter: Run golanci-lint
linter: linter:
golangci-lint run golangci-lint run
## make cluster: Run cluster including 4 nodes ## make cluster: Run cluster including 4 nodes
cluster:install cluster:install${TAGS}
@cd scripts && bash cluster.sh @cd scripts && bash cluster.sh
.PHONY: tester build .PHONY: tester build