Having some problems understanding how to “version/revision” my charms. Hope to get some input.
I’m currently injecting some of my charms with a custom file “version” which contains the commit-hash from github.
This an excerpt from how it looks in my Makefile
.PHONY: version version: ## Generate version file @git describe --tags --dirty --always > grafana/version @echo Building version: `cat grafana/version`
This file is thus included in the charm I build.
The content is a commit hash, for example:
$ cat version sdf3f2
Now, only after UPLOADING the charm to charmhub.io (charmcraft upload/release), it seems that charmhub injects a new file into the charm: “revision”. This file is NOT included by me as a charmer.
My question is about if it is possible to connect the revision file to my custom version file, such that I can link my code to the running version of a charm and have that displayed properly by juju status?