Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add branch as optional key to reported versions #89

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

Closed
wants to merge 4 commits into from

Conversation

foosel
Copy link

@foosel foosel commented Jun 30, 2015

This should provide the branch a release was built from as
part of the reported version data, allowing to access it from
within the application embedding versioneer and at least
displaying it somewhere.

I've been using something like that for over a year now with
OctoPrint, just thought it might be time to try to port it
to the current versioneer version and share it while in the
process ;)

Note: I did adjust (and run) the test suite. I had two errors
with test_invocations.py, however I had the very same
two errors on the master branch without my changes as
well so I don't think I caused them:

======================================================================
ERROR: test_build (__main__.DistutilsRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/git/test_invocations.py", line 273, in test_build
    data = versions_from_file(fn)
  File "src/from_file.py", line 30, in versions_from_file
    raise NotThisMethod("unable to read _version.py")
NotThisMethod: unable to read _version.py

======================================================================
ERROR: test_build (__main__.DistutilsUnpacked)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/git/test_invocations.py", line 475, in test_build
    data = versions_from_file(fn)
  File "src/from_file.py", line 30, in versions_from_file
    raise NotThisMethod("unable to read _version.py")
NotThisMethod: unable to read _version.py

----------------------------------------------------------------------
Ran 34 tests in 56.129s

This should provide the branch a release was built from as
part of the reported version data, allowing to access it from
within the application embedding versioneer and at least
displaying it somewhere.

I've been using something like that for over a year now with
OctoPrint, just thought it might be time to try to port it
to the current versioneer version and share it while in the
process ;)
@foosel
Copy link
Author

foosel commented Jun 30, 2015

Also see #49 (which I wasn't aware of before preparing this)

@foosel
Copy link
Author

foosel commented Jun 30, 2015

Ran the tests... but forgot the linter... sorry for that, fixing...

foosel added 3 commits June 30, 2015 13:24
A couple of lines were too long and the indentation was off at
two places, as flake8 rightfully complained about.
Didn't realize it got included verbatim and hence also needed
to limit line length to 79 chars ;)
@foosel
Copy link
Author

foosel commented Nov 20, 2015

Is there an interest in this? If not just tell me, no harm done, but it would safe me some trouble/allow me to just maintain my own fork with the stuff I need without having to polish it for general consumption :)

@pelson
Copy link
Contributor

pelson commented Nov 20, 2015

@foosel - I did something similar in #90. I'm ok with either approach, but believe that the branch is paramount to determining an appropriate version.

@foosel
Copy link
Author

foosel commented Nov 20, 2015

@pelson I agree. Funny enough I've been doing something similar to your #90 also, see here. Based on a lookup file with which I can define "virtual" tags per branch regex and also override the version renderer. Didn't want to submit it though before the branch stuff was clarified, since without that it doesn't make sense since - as you say - the branch is paramount.

@foosel foosel closed this Oct 19, 2022
@foosel foosel deleted the feature/branch branch October 19, 2022 10:23
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.

2 participants