Skip to content

Commit c7d342e

Browse files
committed
Improve changelog targets
- add different changelog target (pending against `upstream/master` vs. upcoming release build against `upstream/stable`) - generate the changelog/next-version, s.t. the file existence check can be dropped - move LOOSE_CHANGELOG_FILES to the individual targets - document the changelog targets - rename CHANGELOG_VERSION_LATEST to CHANGELOG_VERSION_STABLE - fix whitespace indentation in the changelog documentation
1 parent 2c7f90d commit c7d342e

File tree

1 file changed

+47
-18
lines changed

1 file changed

+47
-18
lines changed

posix.mak

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ ifeq (1,$(DIFFABLE))
236236
DPL_DOCS_PATH_RUN_FLAGS := --no-exact-source-links
237237
else
238238
CHANGELOG_VERSION_MASTER := "v${LATEST}..upstream/master"
239-
CHANGELOG_VERSION_LATEST := "v${LATEST}..upstream/stable"
239+
CHANGELOG_VERSION_STABLE := "v${LATEST}..upstream/stable"
240240
DBLOG_LATEST=$G/dblog_latest.ddoc $G/twid_latest.ddoc
241241
endif
242242

@@ -859,40 +859,69 @@ test: $(ASSERT_WRITELN_BIN)_test test_dspec test/next_version.sh all
859859
# Changelog generation
860860
# --------------------
861861
#
862-
# The changelog generation consists of two parts:
862+
# The changelog generation consists of two parts:
863863
#
864-
# 1) Closed Bugzilla issues since the latest release
865-
# - The git log messages after the ${LATEST} release are parsed
866-
# - From these git commit messages, referenced Bugzilla issues are extracted
867-
# - The status of these issues is checked against the Bugzilla instance (https://issues.dlang.org)
864+
# 1) Closed Bugzilla issues since the latest release
865+
# - The git log messages after the ${LATEST} release are parsed
866+
# - From these git commit messages, referenced Bugzilla issues are extracted
867+
# - The status of these issues is checked against the Bugzilla instance (https://issues.dlang.org)
868868
#
869-
# See also: https://github.com/dlang-bots/dlang-bot#bugzilla
869+
# See also: https://github.com/dlang-bots/dlang-bot#bugzilla
870870
#
871-
# 2) Full-text messages
872-
# - In all dlang repos, a `changelog` folder exists and can be used to add
873-
# small, detailed changelog messages (see e.g. https://github.com/dlang/phobos/tree/master/changelog)
874-
# - The changelog generation script searches for all Ddoc files within the `changelog` folders
875-
# and adds them to the generated changelog
871+
# 2) Full-text messages
872+
# - In all dlang repos, a `changelog` folder exists and can be used to add
873+
# small, detailed changelog messages (see e.g. https://github.com/dlang/phobos/tree/master/changelog)
874+
# - The changelog generation script searches for all Ddoc files within the `changelog` folders
875+
# and adds them to the generated changelog
876876
#
877-
# The changelog script is at https://github.com/dlang/tools/blob/master/changed.d
877+
# The changelog script is at https://github.com/dlang/tools/blob/master/changed.d
878+
#
879+
# Changelog targets
880+
# -----------------
881+
#
882+
# The changelog generation has two targets:
883+
#
884+
# a) Preview upcoming changes
885+
#
886+
# make -f posix.mak pending_changelog
887+
#
888+
# This will look at changes up to `upstream/master` and can be used to
889+
# preview the changelog locally.
890+
#
891+
# b) Generate the changelog for an upcoming release
892+
#
893+
# make -f posix.mak prerelease_changelog
894+
#
895+
# This will look at changes to upstream/stable and is run by the release manager.
878896
################################################################################
879897
LOOSE_CHANGELOG_FILES:=$(wildcard $(DMD_DIR)/changelog/*.dd) \
880898
$(wildcard $(DRUNTIME_DIR)/changelog/*.dd) \
881899
$(wildcard $(PHOBOS_DIR)/changelog/*.dd) \
882900
$(wildcard $(TOOLS_DIR)/changelog/*.dd) \
883901
$(wildcard $(INSTALLER_DIR)/changelog/*.dd)
884902

885-
changelog/next-version: ${DMD_DIR}/VERSION
903+
$G/changelog/next-version: ${DMD_DIR}/VERSION
886904
$(eval NEXT_VERSION:=$(shell changelog/next_version.sh ${DMD_DIR}/VERSION))
905+
@mkdir -p $(dir $@)
906+
@echo $(NEXT_VERSION) > $@
887907

888-
changelog/pending.dd: changelog/next-version | ${STABLE_DMD} ../tools ../installer
889-
[ -f changelog/pending.dd ] || $(STABLE_RDMD) -version=Contributors_Lib $(TOOLS_DIR)/changed.d \
890-
$(CHANGELOG_VERSION_LATEST) -o changelog/pending.dd --version "${NEXT_VERSION}" \
908+
changelog/prerelease.dd: $G/changelog/next-version $(LOOSE_CHANGELOG_FILES) | ${STABLE_DMD} ../tools ../installer
909+
$(STABLE_RDMD) -version=Contributors_Lib $(TOOLS_DIR)/changed.d \
910+
$(CHANGELOG_VERSION_STABLE) -o $@ --version "${NEXT_VERSION}" \
891911
--date "To be released"
892912

893-
pending_changelog: $(LOOSE_CHANGELOG_FILES) changelog/pending.dd html
913+
changelog/pending.dd: $G/changelog/next-version $(LOOSE_CHANGELOG_FILES) | ${STABLE_DMD} ../tools ../installer
914+
$(STABLE_RDMD) -version=Contributors_Lib $(TOOLS_DIR)/changed.d \
915+
$(CHANGELOG_VERSION_MASTER) -o $@ --version "${NEXT_VERSION}" \
916+
--date "To be released"
917+
918+
pending_changelog: changelog/pending.dd html
894919
@echo "Please open file:///$(shell pwd)/web/changelog/pending.html in your browser"
895920

921+
prerelease_changelog: changelog/prerelease.dd html
922+
@echo "Please open file:///$(shell pwd)/web/changelog/prerelease.html in your browser"
923+
@echo "To proceed, rename $@ to changelog/${NEXT_VERSION}_pre.dd"
924+
896925
################################################################################
897926
# Contributors listing: A list of all the awesome who made D possible
898927
################################################################################

0 commit comments

Comments
 (0)