Skip to content

Commit

Permalink
Fix build and download-submodules scripts in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Santev committed Mar 12, 2024
1 parent fe8e4a0 commit ccc63aa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY: download-submodules
download-submodules: check-git
git submodule init
git submodule update
git submodule update --init --remote ./core-contracts

.PHONY: check-git
check-git:
Expand Down Expand Up @@ -39,14 +38,14 @@ protoc: check-protoc
.PHONY: build
build: check-go check-git
$(eval COMMIT_HASH = $(shell git rev-parse HEAD))
$(eval VERSION = $(shell git tag --points-at $COMMIT_HASH))
$(eval VERSION = $(shell git tag --points-at $(COMMIT_HASH)))
$(eval BRANCH = $(shell git rev-parse --abbrev-ref HEAD | tr -d '\040\011\012\015\n'))
$(eval TIME = $(shell date))
go build -o polygon-edge -ldflags="\
-X 'github.com/0xPolygon/polygon-edge/versioning.Version=$(VERSION)' \
-X 'github.com/0xPolygon/polygon-edge/versioning.Commit=$(COMMIT_HASH)'\
-X 'github.com/0xPolygon/polygon-edge/versioning.Branch=$(BRANCH)'\
-X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=$(TIME)'" \
go build -o hydra -ldflags="\
-X 'github.com/Hydra-Chain/hydragon-node/versioning.Version=$(VERSION)' \
-X 'github.com/Hydra-Chain/hydragon-node/versioning.Commit=$(COMMIT_HASH)'\
-X 'github.com/Hydra-Chain/hydragon-node/versioning.Branch=$(BRANCH)'\
-X 'github.com/Hydra-Chain/hydragon-node/versioning.BuildTime=$(TIME)'" \
main.go

.PHONY: lint
Expand Down

0 comments on commit ccc63aa

Please sign in to comment.