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

Standardize version string handling by replacing 'v' prefix in auto update #226

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

jaudiger
Copy link
Contributor

@jaudiger jaudiger commented Feb 2, 2025

Per discussion #225 (comment)

@jaudiger jaudiger force-pushed the refactor-auto-update branch from ed19f14 to 1a05b5a Compare February 2, 2025 20:44
@@ -51,7 +51,7 @@ export function autoUpdate() {

let version = $releaseData
| get tag_name
| str replace '^v' ''
| str replace --regex '^v' ''
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@asheliahut I had to adjust the argument here to properly use the regex capabilities of str replace. Otherwise it was just doing a raw find and replace.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if there is a way to take this stuff for GitHub and make it generic so we put in the repo name, and get back this part of this and a path for any replacement for things in version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kylewlacy began to expose possible solutions here: #176 to hide this work into a dedicated function that could be static or not (depending of the option chosen).

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, Yeah I am not saying this needs to be done here. I am good with accepting. Sorry I have been really focused on work lately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't worry, same on my side, I'm juggling with my work too.

@kylewlacy
Copy link
Member

Makes sense to me to merge as-is!

@kylewlacy kylewlacy merged commit 85fbbc4 into brioche-dev:main Feb 5, 2025
3 checks passed
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.

3 participants