Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x_ field for source git commit #133

Open
haarg opened this issue Nov 28, 2018 · 5 comments
Open

x_ field for source git commit #133

haarg opened this issue Nov 28, 2018 · 5 comments

Comments

@haarg
Copy link
Member

haarg commented Nov 28, 2018

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 field x_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?

@mohawk2
Copy link
Member

mohawk2 commented Nov 28, 2018

I like the idea, though I wonder if the name ought to be more like x_vcs_label so it's not git-specific.

@karenetheridge
Copy link
Member

karenetheridge commented Nov 28, 2018

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).

@mohawk2
Copy link
Member

mohawk2 commented Nov 29, 2018

Should the metadata itself get installed? Perhaps in a .meta.json, similar to a .packlist?

@Leont
Copy link
Member

Leont commented Nov 29, 2018

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.

@haarg
Copy link
Member Author

haarg commented Feb 20, 2019

I'm currently thinking I'll use x_vcs_commit (from git rev-parse HEAD) and x_vcs_tag (from git describe).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants