-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
gh-deploy version check issue #1879
Comments
Thanks for the report. I can confirm that this is a bug, but only when not using official final releases. It appears that the problem is that we are ignoring the m = re.search(r'\d+(\.\d+)+', msg, re.X | re.I)
previousv = parse_version(m.group()) if m else None Note that the regex for the "previous version" does not capture To fix the issue, we need a more complete regex to capture the entire version string. All allowed version strings and the proper sort order is defined in PEP440. Presumably, the regex would capture anything allowed there. Its important to note that "pre" ("alpha," "beta," and "release candidate") and "post" releases, which could all be official releases would also exhibit this bug, so its not just the dev version and warrants a proper fix. That said, MkDocs does not make a practice of doing "pre" and "post" releases, so the priority is not as high as it might be otherwise. Of course, a PR is welcome as always. |
I propose the following regex for this issue. It is not fully compliant with the PEP but I think it is good enough: re.search(r'\d+(\.\d+)+(((a|b|rc)|\.post|\.dev)\d+)*', msg, re.X | re.I) |
I'm using dev version of mkdocs, cloned from trunk. After first
mkdocs gh-deploy
is done, subsequent gh-deploys display the following error:I can perform the deploy using
--ignore-version
, but since 1.1 is not released yet 1.1.dev0 should not be calculated as 1.1.The text was updated successfully, but these errors were encountered: