Repository navigation
Package readme title per package; safe update.sh self-replacement - #8
Merged
Merged
Conversation
- Each package readme opens with its own PackageId; an empty MSKit_PackageReadmeTitle keeps the README heading - READMEs without an H1, with an H1 in a fence, a setext H1, and headings inside nuget:skip / nuget:only blocks
MSKit_PackageReadmeTitle (default auto = PackageId) replaces the first level-1 heading the package keeps, or adds one; empty keeps the README's own heading.
Covers a longer LF copy, a CRLF copy where sh runs one, and update.ps1 when pwsh is present.
- Parse the whole script as one brace group before running it - Copy the new update.sh / update.ps1 as the last step - Changelog: Added MSKit_PackageReadmeTitle, Fixed update.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes for v0.2.1.
MSKit_PackageReadmeTitle(defaultauto=PackageId): the readme generated fromMSKit_PackageReadmeFromreplaces the first level-1 heading the package keeps (ATX or setext, never one in a fence,nuget:skipor another package'snuget:only) with# <PackageId>, or adds it as the first line. Empty keeps the README's heading. Same generator pass, still pack-only and incremental (the title is in the stamp).update.shself-replacement: the script is one brace group parsed before it runs, and copies the newupdate.sh/update.ps1last. A copy of another length (CRLF checkout, older release) no longer stops it halfway withkit.jsonstale.update.ps1was not affected (PowerShell parses the whole file).Upgrading from 0.2.0
The first
--version 0.2.1run still executes 0.2.0's script: it installs the files, then stops with asyntax errorbefore writingkit.json. Run the same command again.Tests
tests/package-readme.sh: 25 title checks — per-package ids, empty and custom override, no H1, fenced H1, setext H1,nuget:skip/nuget:onlyheadings, README unchanged. 13 fail on 0.2.0's generator.tests/update-self.sh: a longer LF copy, a CRLF copy (whereshruns one) andupdate.ps1. 0.2.0'supdate.sh: the longer copy exits 0 withkit.jsonstale, the CRLF copy fails at line 214.