Skip to content

Instantly share code, notes, and snippets.

View codyjwalker's full-sized avatar

Cody Walker codyjwalker

  • BLS-BTU
  • Phoenix, Arizona
  • 19:09 (UTC -12:00)
View GitHub Profile
@grihabor
grihabor / Makefile.version
Last active April 22, 2025 15:01
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))