Closed cjdcordeiro closed 1 year ago
to reproduce it you need to change
parts:
zinc:
plugin: go
source: https://github.com/zincsearch/zincsearch
source-type: git
source-tag: v$0.4.7
to
parts:
zinc:
plugin: go
source: https://github.com/zincsearch/zincsearch
source-type: git
source-tag: v$CRAFT_PROJECT_VERSION
Bug Description
The
CRAFT_PROJECT_VERSION
depends on the rockcraft.yaml'sversion
field and thus should be registered after the YAML is loaded.This should happen in
https://github.com/canonical/rockcraft/blob/bdf64517487be2fac8fa28ddfe3919e08f9b3bde/rockcraft/lifecycle.py#L70
however, the callback does not seem to be working and this environment variable never gets loaded.
To Reproduce
Run
rockcraft --verbosity debug
on https://github.com/jnsgruk/zinc-k8s-operator/blob/main/rockcraft.yaml (originally reported by @jnsgruk in https://chat.charmhub.io/charmhub/pl/h9qytisgti8s3pu6yhe1pq8hpy).Environment
Version:
0+git.bdf6451
rockcraft.yaml
Relevant log output