Skip to content

Commit

Permalink
Merge pull request #326 from Shopify/fix_gotestsum_arch
Browse files Browse the repository at this point in the history
fix gotestsum arch checks
  • Loading branch information
shivnagarajan authored Jan 12, 2022
2 parents 3882a39 + 00ea229 commit ce94688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ BIN_TARGET = $(GOBIN)/$(PROJECT_BIN)
DEB_TARGET = $(BUILD_DIR)/$(PROJECT_BIN)_$(VERSION_STR).deb

PLATFORM := $(shell uname -s | tr A-Z a-z)
GOTESTSUM_URL := "https://github.com/gotestyourself/gotestsum/releases/download/v0.5.1/gotestsum_0.5.1_$(PLATFORM)_amd64.tar.gz"
ARCH := $(shell uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')
GOTESTSUM_URL := "https://github.com/gotestyourself/gotestsum/releases/download/v1.7.0/gotestsum_1.7.0_$(PLATFORM)_$(ARCH).tar.gz"

.PHONY: test test-go test-ruby clean reset-deb-dir $(PROJECTS) $(PROJECT_DEBS)
.DEFAULT_GOAL := test
Expand All @@ -58,7 +59,7 @@ $(GOBIN):
test-go:
@go version
@if [ ! -f ./bin/gotestsum ]; then \
mkdir ./bin; \
mkdir -p ./bin; \
curl -sL $(GOTESTSUM_URL) | tar -xz -C ./bin gotestsum; \
fi

Expand All @@ -74,6 +75,7 @@ clean:
rm -rf build
$(eval proj := *)
rm -f $(BIN_TARGET)
rm -f ./bin/gotestsum

reset-deb-dir:
rm -rf $(DEB_PREFIX)
Expand Down

0 comments on commit ce94688

Please sign in to comment.