Add support for app getting its version dynamically
angela-tran opened this issue · 1 comments
angela-tran commented
May be able to use https://setuptools-git-versioning.readthedocs.io/en/stable/install.html#pyproject-toml
It'd be simplest if this can be done in a way that still works with the old deployment model in case we need to do a release while we're in the middle of working on the new deployment model (e.g. a hotfix).
However, if this isn't compatible with our old deployment model, then we'll need to think more about when to merge this in.
thekaveman commented
We have a model of this working in the littlepay
repo that we may be able to follow:
- Configure
setuptools_scm
in thebuild-system
andtool
sections ofpyproject.toml
- Configure the
version
to be dynamic inpyproject.toml
- Make the package
__init__.py
read the version from the environment For the devcontainer, copy theWe need the.git
directory during build time so version metadata is available.git
directory to be available in the regular appcontainer build as well.
See the following commit with all of the above changes: cal-itp/littlepay@4cf866b