Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(scripts): add release autoversion to bump releases in docs#13063

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedApr 24, 2024
edited
Loading

This PR adds a command to bump versions in docs/markdown.

This is still standalone and needs to be wired up.

For now, I'm planning on putting this inscripts/release.sh (checkout main -> autoversion (this command) -> commit -> submit PR).

It would be pretty neat to make it a GH actions that's triggered on release though, something for the future.

Part of#12465

@mafredriGraphite App
Copy link
MemberAuthor

mafredri commentedApr 24, 2024
edited
Loading

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

A couple of ideas on how to make the source code shorter


match = strings.Replace(match, "[version]", `(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`, 1)
logger.Debug(ctx, "compiling match regexp", "match", match)
matchRe, err = regexp.Compile(match)
Copy link
Member

Choose a reason for hiding this comment

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

maybe move it above and just do MustCompile (shorter code)?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I think a panic here could be jarring. Since we’re actually compiling the contents from the markdown file, there’s no way to do this ahead of time :/

@mafredrimafredri marked this pull request as ready for reviewApril 24, 2024 16:52
@stirby
Copy link
Collaborator

This is great. From what I understand, the usage is:

<!-- autoversion(mainline): "string to match [version]" -->

to update the right version flags on the release?

In the future we will likely revisit how we present the release calendar and other install docs. Having this as an easily insertable call would be awesome.

@mafredri
Copy link
MemberAuthor

mafredri commentedApr 24, 2024
edited
Loading

This is great. From what I understand, the usage is:

<!-- autoversion(mainline): "string to match [version]" -->

to update the right version flags on the release?

Yes, exactly right. It simply needs to appear on/before the line where you want autoversioning to happen, and only the first line that matches is updated. And the format can even be"string to [version] match" (matchingstring to 0.0.0 match and updating 0.0.0). I there need's to be av you'd do"string to v[version] match", etc.

In the future we will likely revisit how we present the release calendar and other install docs. Having this as an easily insertable call would be awesome.

❤️ Great, this is what I had in mind when implementing it. It's better to have it close to where it's used vs. defined somewhere far away in a random program. 😄

Base automatically changed frommafredri/feat-add-promote-mainline-to-stable tomainApril 24, 2024 19:59
@mafredrimafredriforce-pushed themafredri/04-24-chore_scripts_add_release_autoversion_to_bump_releases_in_docs branch from694ac30 to1fdff41CompareApril 25, 2024 08:50
@mafredrimafredri merged commit46dced9 intomainApr 25, 2024
@mafredriGraphite App
Copy link
MemberAuthor

Merge activity

@mafredrimafredri deleted the mafredri/04-24-chore_scripts_add_release_autoversion_to_bump_releases_in_docs branchApril 25, 2024 09:11
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

@dannykoppingdannykoppingdannykopping approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@mafredri@stirby@dannykopping@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp