mccutchen/go-httpbin

VERSION in Makefile resolved to Git hash instead of tag

Opened this issue · 0 comments

The git rev-parse --short HEAD below resolves to Git hash

go-httpbin/Makefile

Lines 3 to 4 in 34a21a3

VERSION ?= $(shell git rev-parse --short HEAD)
DOCKER_TAG ?= mccutchen/go-httpbin:$(VERSION)

Shouldn't the VERSION be based on Git tag, that is, git describe --tags --abbrev=0?

This makes me wonder, is this VERSION actually used for the image tagging?

Perhaps Docker images are tagged following this instruction?

Use `VERSION` to override the tag value
make imagepush VERSION=v1.2.3

If my understanding is correct and there is room for improvement indeed, I can propose PR.