make sure that version is set correctly no matter what (version for 2… #256

Merged
merged 1 commit into from Jan 26, 2016

Conversation

Projects
None yet
2 participants
Contributor

dholbach commented Jan 25, 2016

….0.1 release was '2.0')

LP: #1537580

+ head = codecs.open(changelog, encoding='utf-8').readline()
+ match = re.compile('.*\((.*)\).*').match(head)
+ if match:
+ version = match.group(1)
@kyrofa

kyrofa Jan 25, 2016

Member

I know the possibility of this happening is small, but should version default to 'devel' so if this fails there's still a valid version? Or toss an error? Excellent change here.

@dholbach

dholbach Jan 25, 2016

Contributor

Good thinking.

Member

kyrofa commented Jan 26, 2016

This looks excellent, thank you!

kyrofa added a commit that referenced this pull request Jan 26, 2016

Merge pull request #256 from dholbach/auto-update-version-in-setup.py
make sure that version is set correctly no matter what (version for 2…

@kyrofa kyrofa merged commit 21cc74f into snapcore:master Jan 26, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0%) to 90.524%
Details

@dholbach dholbach deleted the dholbach:auto-update-version-in-setup.py branch Jan 26, 2016

smoser pushed a commit to smoser/snapcraft that referenced this pull request Sep 14, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Merge pull request #256 from dholbach/auto-update-version-in-setup.py
make sure that version is set correctly no matter what (version for 2…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment