Updating my package version using only a Makefile
I think there's an easier way to get this done:


Extract the semver part from the tag (as you already did)
Use conditionals to determine the field to increment
Use a single Awk to increment the selected field


For example:

release:
    $(eval v := $(shell git describe --tags --abbrev=0 | sed -Ee 's/^v|-.*//'))
ifeq ($(bump), major)
    $(eval f := 1)
else ifeq ($(bump), minor)
    $(eval f := 2)
else
    $(eval f := 3)
endif
    @echo $(v) | awk -F. -v OFS=. -v f=$(f) '{ $$f++ } 1'


I would add some validation in case the version doesn't have major, minor, patch components.