Skip to content

VERSION in Makefile resolved to Git hash instead of tag #190

@mloskot

Description

@mloskot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions