canonical / jhack

Chock-full of Juju hackery.
Apache License 2.0
48 stars 23 forks source link

`jhack` snap should infer jhack version from installed project #84

Closed jamesbeedy closed 1 year ago

jamesbeedy commented 1 year ago

Currently, the jhack version is pinned in the snapcraft.yaml and in the pyproject.toml.

This is confusing and increases maintenance overhead.

To fix this issue, infer the project version from importlib metadata and set using snapcraftctl

PietroPasotti commented 1 year ago

I'm not familiar with snapcraftctl, do you have an example snap using this mechanism?

PietroPasotti commented 1 year ago

found some docs: https://snapcraft.io/docs/using-external-metadata#meta-scriptlet