-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
towncrier assumes working on a python package #320
Comments
great idea btw, we would really like to switch using it |
Apparently you need to pass |
There have been some changes which have not yet been released that relate to using towncrier with non-Python projects. There are some infrastructure problems I'm working on before releasing but if you wanted to you could try installing the latest from Git. But, yes, I get a similar traceback. I'll look some more before committing to changing it but it does seem like this is a reasonable case for a more descriptive error message. Thanks for reporting this. |
This has been sitting around for almost a year. Is there a release that supports non-Python projects yet? I mean, you can always hack it by adding an empty Python module to your sources. |
We have the 21.9.0 release candidate done in Sept 2021 at #360 But until 11 days ago, nobody had time to check the package and report if all is ok. so @jfinkhaeuser you can give that release a try and see if its fixed. it would be nice to send a report here :) |
Seems to work the way I'm using it. |
The public release will be out soon (tm) :) |
so I guess that this can be closed as this is fixed. |
Still doesn't work for me if
|
I think that you need to call it like this:
Since no version was passed from the command line, towncrier tries to load the python project and extract the version from there. I agree that the error message is not the best. PR welcomed :) What is the expected result for your Cheers |
Yes, we forgot the |
Maybe more as a feature request, it would be nice to teach towncrier to grab this version from some file that has nothing to do with a python project. |
I am not familiar with how other programming languages are versioned, PR welcomed :) I guess that you can always update your release script to grab the version via some external command and then pass that version to towncrier. I have python project, but the in release process I have a script that does various other things to prepare the release, including the release notes, and it always explicitly passed the version via CLI. |
There is no standard way for many languages (for some there is). I was thinking more along the lines of grepping for a pattern in a file to extract the version, making both configurable. I'm not really touching Python code since the Rust desaster in which a maintainer discriminated against me. Make of that what you will, but unfortunately that means I won't invest time in a PR. And I accept that this may mean that I never see this change. |
For NodeJS/NPM projects, this works: VERSION=`python3 -c "import json; f = open('./package.json', 'r'); v = json.loads(f.read())['version']; f.close(); print(v)"`
{
"name": "matrix-appservice-slack",
"version": "1.10.0",
} |
I'm trying to run
towncrier
on annpm
package but I think it assumes a python package even though README implies it's an optional requirement.How to reproduce
From an empty git repo.
The text was updated successfully, but these errors were encountered: