Manage my own add-on's version release

Hi,

I’m developing my own addon for my python application, which can be installed from the pypi store.
So I have these lines in the Dockerfile:

RUN \
  apk add --no-cache python3 \
  \
  && mkdir -p /opt/MyProject \
  && cd /opt/MyProject \
  && python3 -m venv .venv \
  && source .venv/bin/activate \
  && python3 -m pip install -q MyProject \
  && deactivate

My question is how to handle when my application will have a newer version published on pypi?

I’m thinking making the add-on’s version the same as my application’s version, and install itt using:

pip install MyProject==1.2.0

So every time I release a new version from my application to pypi, I also update the add-on configuration so it would use the new version.

Is there a better way to do it?

Not sure what’s your goal. If you don’t specify a version on the pip install, it will pick the latest version each time you rebuild the addon.

Yes, but that way my addon version will be the same.
So let say, the addon version is 1.2.0, and the same addon version could use different application version which will depend when the addon was built.
So my addon with version 1.2.0 could behave very differently for 2 different users, because the application inside the addon will be very different.

Also that way, I have no way to inform the users, that a new application version is available inside the addon.

I checked the official addon repository, and in a lot of them, they do specify the version of the application that should be used in the addon.
However the version number of the addon is very different then the application version:

That’s the way it should be.
That your dependency is the full application doesn’t matter. You could as well change the dockerfile, or change the configuration, which would bump the version of the addon but not of the dependency.