-
Notifications
You must be signed in to change notification settings - Fork 123
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
Update docs around version discovery #602
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -51,13 +51,16 @@ The ``.gitignore`` will remain and keep Git from not tracking the directory. | |||||||||
Detecting Dates & Versions | ||||||||||
-------------------------- | ||||||||||
|
||||||||||
``towncrier`` needs to know what version your project is, and there are two ways you can give it: | ||||||||||
``towncrier`` needs to know what version your project is. These are the ways you can provide it (and their order of precedence): | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's best to use Semantic newlines for documentation content. Maybe also update this page I guess that not every operaition needs the version. It's not 100% clear what's the order of precendece.
Suggested change
|
||||||||||
|
||||||||||
- For Python 2/3-compatible projects, a ``__version__`` in the top level package. | ||||||||||
This can be either a string literal, a tuple, or an `Incremental <https://github.com/twisted/incremental>`_ version. | ||||||||||
- Manually passing ``--version=<myversionhere>`` when interacting with ``towncrier``. | ||||||||||
1. Manually pass ``--version=<myversionhere>`` when interacting with ``towncrier``. | ||||||||||
2. Set a ``version`` key in your configuration file. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
3. For Python projects with a ``package`` key in the configuration file: | ||||||||||
|
||||||||||
As an example, if your package doesn't have a ``__version__``, you can manually specify it when calling ``towncrier`` on the command line with the ``--version`` flag:: | ||||||||||
- install the package to use its metadata version information | ||||||||||
- add a ``__version__`` in the top level package that is either a string literal, a tuple, or an `Incremental <https://github.com/twisted/incremental>`_ version | ||||||||||
|
||||||||||
As an example, you can manually specify the version when calling ``towncrier`` on the command line with the ``--version`` flag:: | ||||||||||
|
||||||||||
$ towncrier build --version=1.2.3post4 | ||||||||||
|
||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Clarify version discovery behavior. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Clarify version discovery behavior. |
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.
Maybe it's best to have a separate section for version and date.
Most of the info from this section is about version.
A separate section should make it easier to jump to the information aboute date.
and I think that it only detects the current version, so not plural.