charm-tools
charm-tools copied to clipboard
Generate "version" file with SCM info during build
Juju is going to be adding support for a version file at the root of the charm directory that should contain SCM info about exactly what is included in the charm. charm-build needs to generate this file during build, and charm-push will grow a similar feature to add the file during push if it can.
It should support git, bzr, and hg, and should use git describe --dirty and other equivalent commands to include SHA and local modification info. If charm-build is called on something that is not an SCM repo, it should no-op. If there is already a version file in the charm source, it should be overwritten and a warning emitted indicating that it was overwritten.