Add setup.py version plugin - #37
Merged
markchalloner merged 5 commits intoApr 4, 2019
Merged
Conversation
| fi | ||
|
|
||
| tmpfile=$(mktemp) | ||
| sed "s/version[[:blank:]]*=[[:blank:]]*[\",'][0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*[\",'][[:blank:]]*,/version=\"${version_new}\",/" < "${git_root}/setup.py" > "${tmpfile}" |
Owner
There was a problem hiding this comment.
Couple of queries around this regex:
- Are you sure you need the
,in the character class[\",']? - I think you need to escape your full stops (
.), otherwise this will match any character. - It might be worth documenting
[0-9][0-9]*is for Mac compatibility.
Contributor
Author
There was a problem hiding this comment.
Hi Mark,
Thanks for your comments, and you are right about the , between the brackets, and escaping the dot, both were needed changes.
I also added a comment stating that I intentionally avoided using extended regular expressions for compatibility, so please let me know if you catch anything else that can be improved.
Thanks, Fernando
markchalloner
requested changes
Apr 2, 2019
markchalloner
left a comment
Owner
There was a problem hiding this comment.
Looks good to me aside from the minor regex issue.
markchalloner
added a commit
that referenced
this pull request
Apr 4, 2019
This reverts commit 88d180e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #36, this is a plugin to keep the version of the
setup.pyfile in a python project updated.Any comments are welcomed, and thanks in advance for your time reviewing this.
Fernando