Skip to content
Snippets Groups Projects
Commit 6df43fe2 authored by Philipp Stadler's avatar Philipp Stadler
Browse files

chore: support other git dir for changelogs

parent 2545166f
No related branches found
No related tags found
1 merge request!133Feat/external build
# from newest to oldest, stop at LAST_RELEVANT_VERSION
LAST_RELEVANT_VERSION := 1.1.13
LAST_RELEVANT_VERSION ?= 1.1.13
# get all versions from shell and drop all that are older than LAST_RELEVANT_VERSION
# this variable gets expaneded every time it is used, so fetching git tags will change it
GIT_VERSIONS = HEAD $(shell git tag --sort=-v:refname | awk '1;/$(LAST_RELEVANT_VERSION)/{exit}')
......@@ -11,7 +11,7 @@ GIT_VERSION_RANGES = $(join \
# files that will change if we fetch new tags => if anything is changed,
# we rebuild all changelogs (in case the history was rewritten somehow)
# deferred in case we do a fetch first
GIT_TAG_FILES = $(wildcard .git/refs/tags/*) .git/packed-refs
GIT_TAG_FILES = $(wildcard $(and $(GIT_DIR),$(GIT_DIR)/).git/refs/tags/*) $(and $(GIT_DIR),$(GIT_DIR)/).git/packed-refs
VER_CHANGELOGS_MARKDOWN := $(foreach VER,$(GIT_VERSIONS), \
$(BUILD_PREFIX)CHANGELOG-$(VER).md)
VER_CHANGELOGS_HTML := $(foreach VER,$(GIT_VERSIONS), \
......@@ -57,7 +57,7 @@ changelog-head-html: $(firstword $(VER_CHANGELOGS_HTML))
$(COMBINED_CHANGELOG_MARKDOWN): $(VER_CHANGELOGS_MARKDOWN)
# omit unpublished from combined changelog
cat $(VER_CHANGELOGS_HTML_IN_COMBINED) > $(COMBINED_CHANGELOG_MARKDOWN)
$(if $(strip $(VER_CHANGELOGS_HTML_IN_COMBINED)),cat $(VER_CHANGELOGS_HTML_IN_COMBINED),echo No versions yet) > $(COMBINED_CHANGELOG_MARKDOWN)
GIT_LOG_FORMAT := \#\# %B
CHANGELOG_VERSION = $(patsubst $(BUILD_PREFIX)CHANGELOG-%.md,%,$@)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment