Skip to content

Commit

Permalink
Don't run changelog-d in the build
Browse files Browse the repository at this point in the history
This way we lose the preview of release notes on master, as well
as on https://nixos.org/manual/nix/unstable/release-notes/rl-next
but we can come back to this.
  • Loading branch information
roberth committed Nov 24, 2023
1 parent e93b4a7 commit 0f4a6b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 7 additions & 1 deletion doc/manual/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ $(d)/language.json: $(bindir)/nix

# Generate "Upcoming release" notes (or clear it and remove from menu)
$(d)/src/release-notes/rl-next.md: $(d)/rl-next $(d)/rl-next/*
$(trace-gen) changelog-d doc/manual/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
Expand Down
9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

officialRelease = false;

# Set to true to build the release notes for the next release.
buildUnreleasedNotes = false;

version = lib.fileContents ./.version + versionSuffix;
versionSuffix =
if officialRelease
Expand Down Expand Up @@ -196,7 +199,7 @@
]
++ lib.optionals stdenv.hostPlatform.isLinux [(buildPackages.util-linuxMinimal or buildPackages.utillinuxMinimal)]
# Official releases don't have rl-next, so we don't need to compile a changelog
++ lib.optional (!officialRelease) changelog-d
++ lib.optional (!officialRelease && buildUnreleasedNotes) changelog-d
;

buildDeps =
Expand Down Expand Up @@ -734,8 +737,8 @@
++ lib.optional
(stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform)
pkgs.buildPackages.clang-tools
# We want changelog-d in the shell even if it's an official release
++ lib.optional officialRelease changelog-d
# We want changelog-d in the shell even if the current build doesn't need it
++ lib.optional (officialRelease || ! buildUnreleasedNotes) changelog-d
;

buildInputs = buildDeps ++ propagatedDeps
Expand Down

0 comments on commit 0f4a6b1

Please sign in to comment.