Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lau <rlau@redhat.com>2021-04-02 02:56:20 +0300
committerJames M Snell <jasnell@gmail.com>2021-04-07 22:26:34 +0300
commit9cfb418e1fca3a796e4bf782d7ac4a348a042dec (patch)
treebd58f04918074d648a624117e55f8ab0bbb88a6d /Makefile
parent098a4d6551af51e43733818ba5ba7fd93f7dc6b5 (diff)
build: package release changelog for releases
Package the changelog for the release line as `CHANGELOG.md` when building a release binary tarball. PR-URL: https://github.com/nodejs/node/pull/38033 Fixes: https://github.com/nodejs/node/issues/38025 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d103773a616..8ca7fed2d01 100644
--- a/Makefile
+++ b/Makefile
@@ -773,6 +773,7 @@ docclean:
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
VERSION=v$(RAWVER)
+CHANGELOG=doc/changelogs/CHANGELOG_V$(firstword $(subst ., ,$(RAWVER))).md
# For nightly builds, you must set DISTTYPE to "nightly", "next-nightly" or
# "custom". For the nightly and next-nightly case, you need to set DATESTRING
@@ -960,6 +961,15 @@ release-only: check-xz
echo "" >&2 ; \
exit 1 ; \
fi
+ @if [ "$(RELEASE)" = "0" -o -f "$(CHANGELOG)" ]; then \
+ exit 0; \
+ else \
+ echo "" >&2 ; \
+ echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE) but " >&2 ; \
+ echo "$(CHANGELOG) does not exist." >&2 ; \
+ echo "" >&2 ; \
+ exit 1 ; \
+ fi
$(PKG): release-only
$(RM) -r $(MACOSOUTDIR)
@@ -1127,7 +1137,11 @@ $(BINARYTAR): release-only
$(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
+ifeq ("$(wildcard $(CHANGELOG))","")
cp CHANGELOG.md $(BINARYNAME)
+else
+ cp $(CHANGELOG) $(BINARYNAME)/CHANGELOG.md
+endif
ifeq ($(OSTYPE),darwin)
SIGN="$(CODESIGN_CERT)" PKGDIR="$(BINARYNAME)" sh tools/osx-codesign.sh
endif