diff --git a/Makefile b/Makefile index 4f6e7ef8f..aae5e0391 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GOBIN = $(CURDIR)/build/bin GIT_COMMIT ?= $(shell git rev-list -1 HEAD) GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) -GIT_TAG ?= $(shell git describe --tags --dirty) +GIT_TAG ?= $(shell git describe --tags '--match=v*' --dirty) CGO_CFLAGS := $(shell $(GO) env CGO_CFLAGS) # don't loose default CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=1 # Enable MDBX's asserts by default in 'devel' branch and disable in 'stable' diff --git a/hooks/build b/hooks/build new file mode 100755 index 000000000..b5a49356f --- /dev/null +++ b/hooks/build @@ -0,0 +1,8 @@ +#!/bin/bash + +# This is needed to pass build ARGs to Dockerfile. +# see https://docs.docker.com/docker-hub/builds/advanced/ + +DOCKER_FLAGS="-t $IMAGE_NAME" \ +GIT_TAG=$(git describe --tags '--match=v*' --dirty) \ + make docker diff --git a/hooks/post_checkout b/hooks/post_checkout old mode 100644 new mode 100755