-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from ethstorage/issues
add make file to make the built es-node versoin contain
- Loading branch information
Showing
3 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ npm install -g [email protected] | |
``` | ||
#### 4. Build es-node | ||
```sh | ||
cd cmd/es-node && go build && cd ../.. | ||
make | ||
``` | ||
#### 5. Start es-node | ||
```sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
GITCOMMIT := $(shell git rev-parse HEAD) | ||
GITDATE := $(shell git show -s --format='%ct') | ||
BUILDDATE := $(shell date) | ||
|
||
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT) | ||
LDFLAGSSTRING +=-X main.GitDate=$(GITDATE) | ||
LDFLAGSSTRING +=-X main.Meta=$(VERSION_META) | ||
LDFLAGSSTRING +=-X 'main.BuildTime=$(BUILDDATE)' | ||
LDFLAGS := -ldflags "$(LDFLAGSSTRING)" | ||
|
||
es-node: | ||
env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o ./cmd/es-node/es-node ./cmd/es-node/ | ||
|
||
clean: | ||
rm ./cmd/es-node/es-node | ||
|
||
test: | ||
go test -v ./... | ||
|
||
lint: | ||
golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is" | ||
|
||
|
||
.PHONY: \ | ||
es-node \ | ||
clean \ | ||
test \ | ||
lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters