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

updates github action to increment version #166

Merged
merged 7 commits into from
Sep 4, 2024
Merged

updates github action to increment version #166

merged 7 commits into from
Sep 4, 2024

Conversation

bdmorin
Copy link
Contributor

@bdmorin bdmorin commented Sep 3, 2024

sed  -i -E 's/VERSION = ".*?"/VERSION = '$VERSION'/g' find_posts.py

comments out debugging step

@nanos
Copy link
Owner

nanos commented Sep 3, 2024

Thanks for that, I truly appreciate it!

however, this won't actually work more than once.

E.g. it'll replace the line VERSION = "1.7.1" with VERSION = '1.7.2' (single quotes with double quotes) which then won't match the patter on subsequent executions.

Also, I'd quite like to keep the more restrictive pattern to avoid accidentally replacing things that shouldn't be replaced (it's particularly the /g flag on there that makes me very nervous).

@bdmorin
Copy link
Contributor Author

bdmorin commented Sep 3, 2024

Ah, yea I see your point.

sed  -i -E 's/VERSION = ".*?"/VERSION = "'$VERSION'"/g' find_posts.py

That fixes the quote issue.
when I debugged the run, the version number was missing entirely, that's why i didn't match semver. You can put the match back in if VERSION is prepopulated.

I updated the PR

bdmorin and others added 4 commits September 3, 2024 11:03
now only matches if VERSION is at the start of the line
@nanos
Copy link
Owner

nanos commented Sep 4, 2024

thanks again @bdmorin

@nanos nanos merged commit 6009ad2 into nanos:main Sep 4, 2024
1 check 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.

2 participants