dvorapa / meta-version

Spec for the `version` meta extension
Creative Commons Zero v1.0 Universal
18 stars 0 forks source link

Include git commit messages #1

Open junaga opened 8 months ago

junaga commented 8 months ago

How would i, or could i even, include git commit messages? Given a repository revision log like this.

- v0.1.0 "new: `#about` section"
- v0.1.1 "fix: css margin collapse"
- v0.1.2 "typo"

I would like to include the version (v0.1.2) and the commit message "typo"

dvorapa commented 8 months ago

Hi, the specification is currently saying you should not, as there should be no characters before and after semantic versioning string. This is mainly due to the machine-read purpose of this meta name extension. So according to the specification, you can only include whatever semantic versioning specification allows.

Anyway, I would suggest you to either remove the commit message and only leave the version inside. Or you could create a new specification for a new meta name like commit_message, commit_description or anything like that. There is already version (this) and revision (commit hash), which both are for specifying a snapshot of a git repository, so your new meta name could be an addition to these two.

BTW what is the purpose of including the commit message? I'm curious.

Or, and maybe this is the best option for you, you might just ignore the specification and just do whatever you want. This is a free world and there is no one to punish you for breaking this specification. You might just annoy some SEO-bot or web-crawler programmer whose code will break on your site, but that's his/her problem as they definitely should've had a try-catch clause there.

junaga commented 8 months ago

I would like to include the commit message of my latest build for robots and humans to read, and robots to index it + version string. i dont know a lot about SEO but i understand that different robots, maybe not googlebot, but definitely something like the internet archive, keep an archive of past pages. the version string + commit message in the pages would semantically tie such an archive to the repository, if its public.