Skip to content

Commit

Permalink
chore: apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Mar 29, 2023
1 parent c569cd0 commit 2270ba1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ BUILDDIR ?= $(CURDIR)/build
TEST_DOCKER_REPO=jackzampolin/linktest
CGO_ENABLED ?= 1
ARCH ?= x86_64
PLATFORM ?= amd64
TARGET_PLATFORM ?= linux/amd64

export GO111MODULE = on

ifeq ($(ARCH), aarch64)
TARGET_PLATFORM=linux/arm64
endif

# process build tags

build_tags = netgo
Expand Down Expand Up @@ -161,7 +165,7 @@ build: go.sum $(BUILDDIR)/ dbbackend $(LIBSODIUM_TARGET)
CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) CGO_ENABLED=$(CGO_ENABLED) go build -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

build-static: go.sum $(BUILDDIR)/
docker build -t line/finschianode:latest -f builders/Dockerfile.static . --build-arg ARCH=$(ARCH) --platform="linux/$(PLATFORM)"
docker build -t line/finschianode:latest -f builders/Dockerfile.static . --build-arg ARCH=$(ARCH) --platform="$(TARGET_PLATFORM)"

build-static-centos7: go.sum $(BUILDDIR)/
docker build -t line/finschia-builder:static_centos7 -f builders/Dockerfile.static_centos7 .
Expand Down Expand Up @@ -233,7 +237,7 @@ dbbackend:
endif

build-docker:
docker build --build-arg FINSCHIA_BUILD_OPTIONS="$(FINSCHIA_BUILD_OPTIONS)" --build-arg ARCH=$(ARCH) -t line/lbm . --platform="linux/$(PLATFORM)"
docker build --build-arg FINSCHIA_BUILD_OPTIONS="$(FINSCHIA_BUILD_OPTIONS)" --build-arg ARCH=$(ARCH) -t line/lbm . --platform="$(TARGET_PLATFORM)"

build-contract-tests-hooks:
mkdir -p $(BUILDDIR)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _Note1_

If you are using M1 mac, you need to specify build args like this:
```
make build-docker ARCH=aarch64 PLATFORM=arm64
make build-docker ARCH=aarch64
```

**Configure**
Expand Down

0 comments on commit 2270ba1

Please sign in to comment.