Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): refactor readme #37

Merged
merged 9 commits into from
Dec 10, 2024
Merged

chore(docs): refactor readme #37

merged 9 commits into from
Dec 10, 2024

Conversation

3arthqu4ke
Copy link
Member

@3arthqu4ke 3arthqu4ke commented Dec 6, 2024

Release-please seems to update all version strings within a markdown code block.

@3arthqu4ke 3arthqu4ke requested a review from ChipWolf December 6, 2024 22:34
@3arthqu4ke 3arthqu4ke marked this pull request as draft December 6, 2024 22:36
@3arthqu4ke 3arthqu4ke changed the title Fix documentation of mc version chore(documentation): Fix documentation of mc version Dec 6, 2024
@3arthqu4ke 3arthqu4ke marked this pull request as ready for review December 6, 2024 22:39
@3arthqu4ke 3arthqu4ke marked this pull request as draft December 6, 2024 22:51
@3arthqu4ke
Copy link
Member Author

3arthqu4ke commented Dec 6, 2024

@ChipWolf Ok one second: this was done by release-please automatically, so there's a problem with that.
https://github.com/headlesshq/mc-runtime-test/pull/27/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R82

@ChipWolf
Copy link
Member

ChipWolf commented Dec 6, 2024

Oh hah it's the release-please comments in the markdown file. Instead of using the block comments we could just use the inline one like in action.yml, but because it's in a code block it'll unfortunately be visible to the end user.

I used the block comments to avoid ambiguity, but alas

@3arthqu4ke
Copy link
Member Author

3arthqu4ke commented Dec 7, 2024

I see, same issue as this: googleapis/release-please#2345
It sadly does not seem possible to define an own VersionUpdater really.

We could define the code block with html like this

<!-- x-release-please-start-version -->
<pre>
<code class="language-yml">
... yaml stuff

But the yaml syntax highlighting wont work.
I also tried to highlight it manually but within a code block I cannot add color -_-

I think I will just update the version string manually within the README now?

@3arthqu4ke 3arthqu4ke marked this pull request as ready for review December 7, 2024 09:26
@ChipWolf ChipWolf changed the title chore(documentation): Fix documentation of mc version chore(docs): ensure mc version is static Dec 9, 2024
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
release-please-config.json Outdated Show resolved Hide resolved
@3arthqu4ke
Copy link
Member Author

I think I will try a workflow that runs after release-please and fixes the readme

@ChipWolf
Copy link
Member

ChipWolf commented Dec 10, 2024

I think I will try a workflow that runs after release-please and fixes the readme

sed -i -E 's/^(\s+)mc: .+$/\1mc: 1.21.4/' README.md
  • ^(\s+): Captures the leading whitespace into a group (\1).
  • mc: .+$: Matches mc: followed by at least one character (.+) up to the end of the line ($).
  • \1mc: 1.21.4: Replaces the match with the captured whitespace followed by mc: 1.21.4.

@ChipWolf
Copy link
Member

@3arthqu4ke I've put a good amount of thought into this

In theory, we should only have the major version referenced in the README, i.e. headlesshq/mc-runtime-test@v3, as most users don't keep their actions updated at any reasonable cadence.

To achieve this we're going to have to do some trickery in the release pipeline, I'll be setting up a PR for this soon

We should also assess which tags are in use and push deprecated notices to them all.

@ChipWolf
Copy link
Member

For now, that last commit should do the trick @3arthqu4ke

@ChipWolf ChipWolf self-requested a review December 10, 2024 20:07
Copy link
Member

@ChipWolf ChipWolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ChipWolf ChipWolf changed the title chore(docs): ensure mc version is static chore(docs): refactor readme Dec 10, 2024
@ChipWolf ChipWolf mentioned this pull request Dec 10, 2024
@ChipWolf ChipWolf merged commit ec64a36 into main Dec 10, 2024
7 checks passed
@ChipWolf ChipWolf deleted the fix-documentation branch December 10, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants