- Notifications
You must be signed in to change notification settings - Fork928
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
chore(scripts): add release autoversion to bump releases in docs#13063
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mafredri commentedApr 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed by Graphite.Learn more about stacking. |
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this 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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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) |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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 :/
This is great. From what I understand, the usage is:
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 commentedApr 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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
❤️ 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. 😄 |
694ac30
to1fdff41
Compare
Uh oh!
There was an error while loading.Please reload this page.
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 in
scripts/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