Open haarg opened 5 years ago
I like the idea, though I wonder if the name ought to be more like x_vcs_label
so it's not git-specific.
I've been marking my releases with the git tag + commit sha via Dist::Zilla::Plugin::Git::Describe for quite some time (it uses git describe --always --long
). Including this data into meta doesn't sound bad, but I would (also) want to keep the commit sha right in the code, as that's very helpful later when looking at an installed source tree (when the meta data might no longer be present).
Should the metadata itself get installed? Perhaps in a .meta.json
, similar to a .packlist
?
Should the metadata itself get installed? Perhaps in a .meta.json, similar to a .packlist?
Actually cpanm already does that (in $archdir/.meta/$full_distname/
). It's not standardized though.
I'm currently thinking I'll use x_vcs_commit
(from git rev-parse HEAD
) and x_vcs_tag
(from git describe
).
I'd like to start recording the git commit that was used to build a release in an
x_
field. I started prototyping this with the fieldx_built_from_commit
. The same field could be used by other SCMs. It might also make sense to record a tag name rather than (or in addition to?) a commit. An example of a use for this would be MetaCPAN being able to link directly to the state of the repo for a given release.This wouldn't be part of the spec, but does anyone have any thoughts on it?