Reputation: 6318
I am trying to create a release history, how can I identify which commit a specific version of a gem was created from on rubygems.com? When I extract the *.gem archive it does not include any logging of the commit.
EDIT: The releases were pushed to rubygems without updating the github repo with the relevant tags, I want to backfill github with the appropriate release tags.
Upvotes: 1
Views: 100
Reputation: 106922
Simple answer: You cannot!
Versions of a gem on Rubygems and commits or tags in Git are two totally different concepts and have nothing in common.
You already discovered that the gem doesn't contain any information about the use of git or a specific commit. And if you think about that, it makes sense that gems do not contain information about the version control system that was used:
That said, the assumption that a specific gem version corresponds with a specific git commit is just valid.
Upvotes: 2
Reputation: 11226
Normally there will be a link to the source code on the gem page of rubygems.org
From there you should be taken to the repo, for example if you visit https://rubygems.org/gems/devise you will see link on the right side of the page that says Source Code
which should link to
https://github.com/plataformatec/devise/
Then you can just click on releases
at the top of the repo or go to
https://github.com/plataformatec/devise/releases
There you will see the commit the release was built from.
If you just download the .gem file from rubygems.org that will only include the gem code itself and not the git history whatsoever. If you want the full git history you should clone the repo to your local machine. To do so, click on the Clone or download
button at the top of the repo's home page. If you copy the url from there, can just go to your terminal and type
git clone <paste repo url here>
Upvotes: 0