diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index aa005089..e181fe48 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -71,6 +71,8 @@ jobs: platforms: ${{ matrix.os }}/${{ matrix.arch }} tags: xion:${{ matrix.os }}-${{ matrix.arch }} build-args: | + COMMIT=${{ github.sha }} + VERSION=${{ github.ref_name }} XIOND_BINARY=dist/xiond_${{ matrix.os }}_${{ matrix.arch }}/xiond - name: Build Heighliner Image @@ -84,6 +86,8 @@ jobs: platforms: ${{ matrix.os }}/${{ matrix.arch }} tags: heighliner:${{ matrix.os }}-${{ matrix.arch }} build-args: | + COMMIT=${{ github.sha }} + VERSION=${{ github.ref_name }} XIOND_BINARY=dist/xiond_${{ matrix.os }}_${{ matrix.arch }}/xiond - name: Save Docker Image diff --git a/Makefile b/Makefile index c9581a83..10f30eb2 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ PACKAGES_SIMTEST = $(shell go list ./... | grep '/simulation') VERSION ?= $(shell echo $(shell git describe --tags) | sed 's/^v//') COMMIT ?= $(shell git log -1 --format='%H') -TAG_VERSION ?= $(shell git rev-parse --short HEAD) LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') BINDIR ?= $(GOPATH)/bin @@ -86,7 +85,7 @@ all: install lint test install: go.sum go install -mod=readonly $(BUILD_FLAGS) ./cmd/xiond -build: go.sum +build: guard-VERSION guard-COMMIT ifeq ($(OS),Windows_NT) $(error wasmd server not supported. Use "make build-windows-client" for client) exit 1 @@ -231,6 +230,12 @@ clean: distclean: clean rm -rf vendor/ +guard-%: + @ if [ "${${*}}" = "" ]; then \ + echo "Environment variable $* not set"; \ + exit 1; \ + fi + ############################################################################### ### Testing ### ###############################################################################