aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 07:11:19 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 07:11:19 +0100
commite8a488236c0f3e33d3ed71a5bb543d59ec54d2f1 (patch)
tree8d5acbaa29084240621b9bcd4b4d3381959936cc /doc
parentd8a293d61d4b4e826ae1c153b5a816d0e0e8138d (diff)
Merge pull request #9393 from hercules-ci/changelog-d
Automatically compile hand-written release notes with `changelog-d` (cherry picked from commit 928f0c13414d20c1af88b30bd6700fd730ee0bab) Change-Id: Ia0685835c52edf185b64dd696b19305746c077e5
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/local.mk22
-rw-r--r--doc/manual/rl-next/config2
-rw-r--r--doc/manual/rl-next/nix-env-json-drv-path.md9
-rw-r--r--doc/manual/src/SUMMARY.md.in1
-rw-r--r--doc/manual/src/contributing/hacking.md38
-rw-r--r--doc/manual/src/release-notes/rl-next.md5
6 files changed, 70 insertions, 7 deletions
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
index 826783675..b434b8fea 100644
--- a/doc/manual/local.mk
+++ b/doc/manual/local.mk
@@ -92,7 +92,7 @@ $(d)/nix-profiles.5: $(d)/src/command-ref/files/profiles.md
$(trace-gen) lowdown -sT man --nroff-nolinks -M section=5 $^.tmp -o $@
@rm $^.tmp
-$(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md
+$(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/SUMMARY-rl-next.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md
@cp $< $@
@$(call process-includes,$@,$@)
@@ -144,6 +144,24 @@ $(d)/language.json: $(bindir)/nix
$(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-language > $@.tmp
@mv $@.tmp $@
+# Generate "Upcoming release" notes (or clear it and remove from menu)
+$(d)/src/release-notes/rl-next.md: $(d)/rl-next $(d)/rl-next/*
+ @if type -p changelog-d > /dev/null; then \
+ echo " GEN " $@; \
+ changelog-d doc/manual/rl-next > $@; \
+ else \
+ echo " NULL " $@; \
+ true > $@; \
+ fi
+
+$(d)/src/SUMMARY-rl-next.md: $(d)/src/release-notes/rl-next.md
+ $(trace-gen) true
+ @if [ -s $< ]; then \
+ echo ' - [Upcoming release](release-notes/rl-next.md)' > $@; \
+ else \
+ true > $@; \
+ fi
+
# Generate the HTML manual.
.PHONY: manual-html
manual-html: $(docdir)/manual/index.html
@@ -173,7 +191,7 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
done
@touch $@
-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md $(d)/src/language/builtin-constants.md
+$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md $(d)/src/language/builtin-constants.md $(d)/src/release-notes/rl-next.md
$(trace-gen) \
tmp="$$(mktemp -d)"; \
cp -r doc/manual "$$tmp"; \
diff --git a/doc/manual/rl-next/config b/doc/manual/rl-next/config
new file mode 100644
index 000000000..b3c2e868f
--- /dev/null
+++ b/doc/manual/rl-next/config
@@ -0,0 +1,2 @@
+organization: NixOS
+repository: nix
diff --git a/doc/manual/rl-next/nix-env-json-drv-path.md b/doc/manual/rl-next/nix-env-json-drv-path.md
new file mode 100644
index 000000000..fbe2b67d8
--- /dev/null
+++ b/doc/manual/rl-next/nix-env-json-drv-path.md
@@ -0,0 +1,9 @@
+synopsis: Fix `nix-env --query --drv-path --json`
+prs: #9257
+description: {
+
+Fixed a bug where `nix-env --query` ignored `--drv-path` when `--json` was set.
+
+}
+
+
diff --git a/doc/manual/src/SUMMARY.md.in b/doc/manual/src/SUMMARY.md.in
index 5d6388110..acb87cc01 100644
--- a/doc/manual/src/SUMMARY.md.in
+++ b/doc/manual/src/SUMMARY.md.in
@@ -109,6 +109,7 @@
- [CLI guideline](contributing/cli-guideline.md)
- [C++ style guide](contributing/cxx.md)
- [Release Notes](release-notes/release-notes.md)
+{{#include ./SUMMARY-rl-next.md}}
- [Release 2.18 (2023-09-20)](release-notes/rl-2.18.md)
- [Release 2.17 (2023-07-24)](release-notes/rl-2.17.md)
- [Release 2.16 (2023-05-31)](release-notes/rl-2.16.md)
diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md
index 442a00c61..dbe0c82cf 100644
--- a/doc/manual/src/contributing/hacking.md
+++ b/doc/manual/src/contributing/hacking.md
@@ -285,3 +285,41 @@ can build it yourself:
Metrics about the change in line/function coverage over time are also
[available](https://hydra.nixos.org/job/nix/master/coverage#tabs-charts).
+
+## Add a release note
+
+`doc/manual/rl-next` contains release notes entries for all unreleased changes.
+
+User-visible changes should come with a release note.
+
+### Add an entry
+
+Here's what a complete entry looks like. The file name is not incorporated in the document.
+
+```
+synopsis: Basically a title
+issues: #1234
+prs: #1238
+description: {
+
+Here's one or more paragraphs that describe the change.
+
+- It's markdown
+- Add references to the manual using @docroot@
+
+}
+```
+
+Significant changes should add the following header, which moves them to the top.
+
+```
+significance: significant
+```
+
+<!-- Keep an eye on https://codeberg.org/fgaz/changelog-d/issues/1 -->
+See also the [format documentation](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#changelog).
+
+### Build process
+
+Releases have a precomputed `rl-MAJOR.MINOR.md`, and no `rl-next.md`.
+Set `buildUnreleasedNotes = true;` in `flake.nix` to build the release notes on the fly.
diff --git a/doc/manual/src/release-notes/rl-next.md b/doc/manual/src/release-notes/rl-next.md
deleted file mode 100644
index 2b4631ce1..000000000
--- a/doc/manual/src/release-notes/rl-next.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Release X.Y (202?-??-??)
-
-- `nix-shell` shebang lines now support single-quoted arguments.
-
-- Fixed a bug where `nix-env --query` ignored `--drv-path` when `--json` was set.