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

fix: fetch version from pyproject.toml #275

Closed Synertry closed 1 year ago

Synertry commented 1 year ago

Fix for #274 caused by #273

Problem

Version management was improved by last merged pr. The version checker parses the version file animdl/core/version.py online and still expects the hardcoded value.

Solution

This pr redirects the target for the regex to pyproject.toml, to support the version management improvement.

I have added a new constant, to clearly distinguish it from the version file. But I kept the constant VERSION_FILE_PATH. It is not referenced anywhere else in the code anymore, but maybe it is useful in the future(?).

Synertry commented 1 year ago

This is the correct end code for the better version management. In the current state though, to ideally pull this through, we have to:

  1. and foremost revert animdl/core/version.py manual versioning, otherwise even updating is not possible.
  2. then we need to change the target for the version checker to pyproject as seen with this pr in a seperate update.
  3. lastly, it has to be ensured everyone has the newest version, so it won't break older versions <= 1.7.14, which rely on a hardcoded value in animdl/core/version.py

This is sth for a major version change or above, not for a minor version bump, as neat as it would have been though.