Skip to content

Commit

Permalink
Update arch and show version after build
Browse files Browse the repository at this point in the history
  • Loading branch information
miry committed Sep 7, 2022
1 parent d17c177 commit 53a7f78
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OS := $(shell uname -s)
ARCH := $(shell uname -m)
GO_VERSION := $(shell go version | cut -f3 -d" ")
GO_MINOR_VERSION := $(shell echo $(GO_VERSION) | cut -f2 -d.)
GO_PATCH_VERSION := $(shell echo $(GO_VERSION) | cut -f3 -d. | sed "s/^\s*$$/0/")
Expand All @@ -13,7 +14,7 @@ test:
$(MALLOC_ENV) go test -v -race -timeout 1m ./...

.PHONY: test-e2e
test-e2e: container.build build
test-e2e: build container.build
scripts/test-e2e
timeout -v --preserve-status --foreground 10m scripts/test-e2e-hazelcast toxiproxy

Expand Down Expand Up @@ -48,9 +49,10 @@ build: dist clean

.PHONY: container.build
container.build:
env GOOS=linux go build -ldflags="-s -w" -o ./dist/toxiproxy-server-linux-$(uname -m) ./cmd/server
env GOOS=linux go build -ldflags="-s -w" -o ./dist/toxiproxy-cli-linux-$(uname -m) ./cmd/cli
env GOOS=linux go build -ldflags="-s -w" -o ./dist/toxiproxy-server-linux-$(ARCH) ./cmd/server
env GOOS=linux go build -ldflags="-s -w" -o ./dist/toxiproxy-cli-linux-$(ARCH) ./cmd/cli
docker build -f Dockerfile -t toxiproxy dist
docker run --rm toxiproxy --version

.PHONY: release
release:
Expand Down

0 comments on commit 53a7f78

Please sign in to comment.