-
Notifications
You must be signed in to change notification settings - Fork 12
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
Development file support #4
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: John-Eric Kamps <[email protected]>
…devel, nightly, daily, weekly, monthly). No need to set them manually. Signed-off-by: John-Eric Kamps <[email protected]>
Signed-off-by: John-Eric Kamps <[email protected]>
@antonlacon @lrusak could you have a look ? |
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.
Initial comments from looking at the python usage. I haven't tried parsing the prettyname regex out, or looked at the manual update function in the addon where this gets used yet.
@@ -92,7 +93,10 @@ def __init__(self, args): | |||
if args.prettyname: | |||
self._prettyname = args.prettyname | |||
else: | |||
self._prettyname = PRETTYNAME | |||
if args.dev_prettyname: |
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.
This could be an elif
at same indent.
@@ -191,13 +195,19 @@ def custom_sort_release(self, a, b): | |||
if not a_maj_min_patch: | |||
a_maj_min_patch = self._regex_xydate_custom_short_sort.search(a) | |||
|
|||
if not a_maj_min_patch: | |||
raise Exception('ERROR: Filename not like expected') |
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.
An f-string, or similar, to make this exception more useful:
raise Exception(f'ERROR: Unexpected filename: {a}')
b_maj_min_patch = self._regex_xyz_custom_sort.search(b) | ||
if not b_maj_min_patch: | ||
b_maj_min_patch = self._regex_xydate_custom_sort.search(b) | ||
|
||
if not b_maj_min_patch: | ||
b_maj_min_patch = self._regex_xydate_custom_short_sort.search(b) | ||
|
||
if not b_maj_min_patch: | ||
raise Exception('ERROR: Filename not like expected') |
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.
Same comment as for a
.
@@ -394,6 +404,9 @@ def WriteFile(self): | |||
parser.add_argument('-p', '--prettyname', metavar='REGEX', required=False, \ | |||
help='Optional prettyname regex, default is %s' % PRETTYNAME) | |||
|
|||
parser.add_argument('-d', '--dev_prettyname', action="store_true", required=False, \ | |||
help=' Enable prettyname regex for development builds (devel, nightly, daily, weekly, monthly)') | |||
|
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.
Leading space in the help string.
Please merge the following changes for full development file support and development pretty name support per new argument -d
I checked them with the myself generated files.
Thanks a lot