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

feat(tools): Python script for automatically applying version (#6012) #6080

Merged
merged 1 commit into from May 6, 2024

Conversation

becseya
Copy link
Contributor

@becseya becseya commented Apr 16, 2024

Fixes #6012

Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor comments.

When #5865 will be merged this script needs to be slightly updated. So let's wait for #5865.

description='Apply the specified version to affected source files')
parser.add_argument('version', metavar='version', type=str,
help='The version to apply')

Copy link
Member

Choose a reason for hiding this comment

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

Please add a help too with usage example(s).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added



class Version:
RE_PATTERN = r"(\d+)\.(\d+)\.(\d+)(-dev)?"
Copy link
Member

Choose a reason for hiding this comment

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

Do not limit it to -dev.

Suggested change
RE_PATTERN = r"(\d+)\.(\d+)\.(\d+)(-dev)?"
RE_PATTERN = r"(\d+)\.(\d+)\.(\d+)(-a-zA-Z0-9)?"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@becseya becseya force-pushed the feature/6012_release_script branch from 4cb67f3 to 9ec684c Compare April 17, 2024 09:41
@kisvegabor
Copy link
Member

Great, thank you! I hope #5865 will be merged soon.

@kisvegabor
Copy link
Member

@becseya #5865 is merged, please update this PR accordingly.

@becseya becseya force-pushed the feature/6012_release_script branch 2 times, most recently from 6a61911 to 35b0475 Compare April 22, 2024 08:39
@becseya
Copy link
Contributor Author

becseya commented Apr 22, 2024

Updated

Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

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

I've tested it and it works very well! Thank you!

@becseya
Copy link
Contributor Author

becseya commented Apr 24, 2024

Does it need to be cherry-picked to other release branches?

@kisvegabor
Copy link
Member

I think no for now. v9.2 will be released from master and it's unlikely that we will have v9.1.1. There no plan for v8.4.1 either.

XuNeo
XuNeo previously approved these changes Apr 29, 2024
Copy link
Collaborator

@XuNeo XuNeo left a comment

Choose a reason for hiding this comment

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

I'm not familiar with regular expression. Please give it a full test.

scripts/update_version.py Outdated Show resolved Hide resolved
@kisvegabor
Copy link
Member

How can we test such a script?

@becseya
Copy link
Contributor Author

becseya commented May 3, 2024

It was tested manually for several version variants. I'd go with that, writing test cases for such a small script feels extensive.

@kisvegabor
Copy link
Member

Not all questions are clear about updating version numbers but I merge it now to make some order.

Probably a follow up PR will be required.

@kisvegabor kisvegabor merged commit 76267c1 into lvgl:master May 6, 2024
19 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.

Add a release script
4 participants