forked from lix-project/lix
docs: don't compute rl-next.md during build
not sure why this was done the way it was considering that includes are a feature the doc toolchain had previously. let's just always have some kind of entry for the upcoming release in the dev manual builds even if that means having a completely empty release notes chapter. the release notes generation script isn't entirely functional right now due to pre-commit hooks, but it's good enough for time being. we need a better release process for notes anyway. Change-Id:Ifda6912cf5233db013f72a30247a62d6f22b1565
Change-Id:I9eb347ec4aabc5be2b816ff0fd3e4be45f93b934
This commit is contained in:
parent
07ef9f9f5d
commit
d9bc197ff4
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -22,14 +22,13 @@ perl/Makefile.config
|
|||
/doc/manual/language.json
|
||||
/doc/manual/xp-features.json
|
||||
/doc/manual/src/SUMMARY.md
|
||||
/doc/manual/src/SUMMARY-rl-next.md
|
||||
/doc/manual/src/command-ref/new-cli
|
||||
/doc/manual/src/command-ref/conf-file.md
|
||||
/doc/manual/src/command-ref/experimental-features-shortlist.md
|
||||
/doc/manual/src/contributing/experimental-feature-descriptions.md
|
||||
/doc/manual/src/language/builtins.md
|
||||
/doc/manual/src/language/builtin-constants.md
|
||||
/doc/manual/src/release-notes/rl-next.md
|
||||
/doc/manual/src/release-notes/rl-next-generated.md
|
||||
|
||||
# /scripts/
|
||||
/scripts/nix-profile.sh
|
||||
|
|
|
@ -60,7 +60,7 @@ $(d)/nix.conf.5: $(d)/src/command-ref/conf-file.md
|
|||
$(d)/nix-profiles.5: $(d)/src/command-ref/files/profiles.md
|
||||
$(trace-gen) doc/manual/render-manpage.sh "$$(basename $@ .5)" 5 $^ $^.tmp $@
|
||||
|
||||
$(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
|
||||
$(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md
|
||||
@cp $< $@
|
||||
@doc/manual/process-includes.sh $@ $@
|
||||
|
||||
|
@ -113,7 +113,7 @@ $(d)/language.json: $(doc_nix)
|
|||
@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/*
|
||||
$(d)/src/release-notes/rl-next-generated.md: $(d)/rl-next $(d)/rl-next/*
|
||||
@if type -p build-release-notes > /dev/null; then \
|
||||
echo " GEN " $@; \
|
||||
build-release-notes doc/manual/rl-next > $@; \
|
||||
|
@ -122,14 +122,6 @@ $(d)/src/release-notes/rl-next.md: $(d)/rl-next $(d)/rl-next/*
|
|||
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
|
||||
|
@ -159,7 +151,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 $(d)/src/release-notes/rl-next.md $(d)/docroot.py
|
||||
$(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-generated.md $(d)/docroot.py
|
||||
$(trace-gen) \
|
||||
tmp="$$(mktemp -d)"; \
|
||||
cp -r doc/manual "$$tmp"; \
|
||||
|
|
|
@ -109,7 +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}}
|
||||
- [Upcoming release](release-notes/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)
|
||||
|
|
3
doc/manual/src/release-notes/rl-next.md
Normal file
3
doc/manual/src/release-notes/rl-next.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Upcoming release
|
||||
|
||||
{{#include rl-next-generated.md}}
|
|
@ -8,7 +8,7 @@
|
|||
# This does double duty for
|
||||
# - including rl-next
|
||||
# - marking where to insert new links (right after)
|
||||
SUMMARY_MARKER_LINE='{{#include ./SUMMARY-rl-next.md}}'
|
||||
SUMMARY_MARKER_LINE='release-notes/rl-next.md'
|
||||
|
||||
# --- LIB ---
|
||||
|
||||
|
@ -79,9 +79,9 @@ if ! git diff --quiet --cached; then
|
|||
die "repo has staged changes, please commit or stash them"
|
||||
fi
|
||||
|
||||
if ! grep "$SUMMARY_MARKER_LINE" doc/manual/src/SUMMARY.md.in >/dev/null; then
|
||||
if ! grep -F "$SUMMARY_MARKER_LINE" doc/manual/src/SUMMARY.md >/dev/null; then
|
||||
# would have been nice to catch this early, but won't be worth the extra infra
|
||||
die "SUMMARY.md.in is missing the marker line '$SUMMARY_MARKER_LINE', which would be used for inserting a new release notes page. Please fix the script."
|
||||
die "SUMMARY.md is missing the marker line '$SUMMARY_MARKER_LINE', which would be used for inserting a new release notes page. Please fix the script."
|
||||
fi
|
||||
|
||||
if [[ ! -n "${VERSION:-}" ]]; then
|
||||
|
@ -163,7 +163,7 @@ if ! $IS_PATCH; then
|
|||
# find the marker line, insert new link after it
|
||||
escaped_marker="$(echo "$SUMMARY_MARKER_LINE" | sed -e 's/\//\\\//g' -e 's/ /\\ /g')"
|
||||
escaped_line="$(echo "$NEW_SUMMARY_LINE" | sed -e 's/\//\\\//g' -e 's/ /\\ /g')"
|
||||
logcmd sed -i -e "/$escaped_marker/a $escaped_line" doc/manual/src/SUMMARY.md.in
|
||||
logcmd sed -i -e "/$escaped_marker/a $escaped_line" doc/manual/src/SUMMARY.md
|
||||
fi
|
||||
|
||||
for f in doc/manual/rl-next/*.md; do
|
||||
|
@ -172,7 +172,7 @@ for f in doc/manual/rl-next/*.md; do
|
|||
fi
|
||||
done
|
||||
|
||||
logcmd git add $file doc/manual/src/SUMMARY.md.in
|
||||
logcmd git add $file doc/manual/src/SUMMARY.md
|
||||
logcmd git status
|
||||
logcmd git commit -m "release notes: $version_full"
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ release:
|
|||
|
||||
```console
|
||||
$ sed -e 's/officialRelease = false;/officialRelease = true;/' -i flake.nix
|
||||
$ sed -e '/rl-next.md/ d' -i doc/manual/src/SUMMARY.md
|
||||
```
|
||||
|
||||
This removes the link to `rl-next.md` from the manual and sets
|
||||
|
|
Loading…
Reference in a new issue