justfoolingaround / animdl

A highly efficient, fast, powerful and light-weight anime downloader and streamer for your favorite anime.
GNU General Public License v3.0
1.32k stars 109 forks source link

chore: Improve version management in packaging build process #273

Closed Synertry closed 1 year ago

Synertry commented 1 year ago

This will fix issue #272

Version in pyproject.toml was not bumped last two patches. Firstly, this will bump the version to 1.7.15. Secondly, for easier maintaining in the future. I would suggest using a variable from importlib.metadata in animdl/core/version.py. In this way, the version has only to be maintained in pyproject.toml.

Source

justfoolingaround commented 1 year ago

LGTM at the moment.

Synertry commented 1 year ago

@justfoolingaround it seems the main utils parse the version file on this GitHub: https://github.com/justfoolingaround/animdl/blob/3f200460c1cda443d8510ab0e3ae499882c85c03/animdl/__main__.py#L75 which is the source for this issue #274

I am sorry, I haven't tested it against this scenario. Hardcoding the value again in animdl/core/version.py is the quickest fix. I'll try to come up with the regex on the redirected target pyproject.toml for the parser in the mean time.