Skip to content

Commit

Permalink
chore: fix tools in Makefile (#335)
Browse files Browse the repository at this point in the history
* fix lint tool and docker

* fix tooling

* update to main go mod

* clean up

* check version message

---------

Co-authored-by: aljo242 <[email protected]>
  • Loading branch information
Alex Johnson and aljo242 authored Mar 21, 2023
1 parent 51efdcf commit 0b79d81
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/make -f

DOCKER_BUILDKIT=1
COSMOS_BUILD_OPTIONS ?= ""
PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation')
Expand All @@ -14,6 +15,7 @@ QS_BINARY = quicksilverd
QS_DIR = quicksilver
BUILDDIR ?= $(CURDIR)/build
HTTPS_GIT := https://github.com/ingenuity-build/quicksilver.git

DOCKER := $(shell which docker)
DOCKERCOMPOSE := $(shell which docker-compose)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
Expand Down Expand Up @@ -125,21 +127,21 @@ endif
### Build ###
###############################################################################

BUILD_TARGETS := build install

check_version:
ifneq ($(GO_MINOR_VERSION),19)
@echo "ERROR: Go version 1.19 is required for building Quicksilver. There are consensus breaking changes between binaries compiled with Go 1.18 and Go 1.19."
@echo "ERROR: Go version 1.19 is required for building Quicksilver. There are consensus breaking changes between binaries compiled with and without Go 1.19."
exit 1
endif

BUILD_TARGETS := build install


build: BUILD_ARGS=-o $(BUILDDIR)/

build-linux:
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

$(BUILD_TARGETS): check_version go.sum $(BUILDDIR)/
go $@ $(BUILD_FLAGS) $(BUILD_ARGS) ./cmd/quicksilverd
go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./cmd/quicksilverd

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/
Expand Down Expand Up @@ -388,6 +390,7 @@ e2e-check-image-sha:
e2e-remove-resources:
test/e2e/scripts/run/remove_stale_resources.sh


.PHONY: run-tests test test-all test-import test-rpc $(TEST_TARGETS)

SIM_NUM_BLOCKS ?= 500
Expand Down

0 comments on commit 0b79d81

Please sign in to comment.