Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Check for file or folder when checking for git hash in build metadata#6733

Merged
1 commit merged intomasterfrom
colby/fix-rubygems-spec-suite
Oct 12, 2018
Merged

Check for file or folder when checking for git hash in build metadata#6733
1 commit merged intomasterfrom
colby/fix-rubygems-spec-suite

Conversation

@colby-swandale
Copy link
Copy Markdown
Member

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

What was the end-user problem that led to this PR?

A change that was introduced in #6664 is breaking RubyGem's specs because the Build Metadata is not being generated correctly.

This is breaking because the change is checking for the .git to determine if the git hash should be fetched for the version string. This folder does not exist in the submodule in RubyGems' repo

What was your diagnosis of the problem?

See https://travis-ci.org/rubygems/rubygems/jobs/437576972

What is your fix for the problem, implemented in this PR?

Check if .git exists either as a file or folder

@colby-swandale colby-swandale force-pushed the colby/fix-rubygems-spec-suite branch from 9823679 to 938938f Compare October 11, 2018 06:30
@greysteil
Copy link
Copy Markdown
Contributor

@colby-swandale - will the git rev-parse --short HEAD command that will then be run actually return in this case? Otherwise we should change the test, not the code.

@colby-swandale
Copy link
Copy Markdown
Member Author

Yes, it will return a hash (although it's RubyGem's git hash)

~/Projects/rubygems/bundler
❯ git rev-parse --short HEAD
a356d8cf9

@greysteil
Copy link
Copy Markdown
Contributor

Cool, that still sounds useful. 👍 from me.

@colby-swandale
Copy link
Copy Markdown
Member Author

@bundlerbot r+

ghost pushed a commit that referenced this pull request Oct 12, 2018
6733: Check for file or folder when checking for git hash in build metadata r=colby-swandale a=colby-swandale

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

### What was the end-user problem that led to this PR?

A change that was introduced in #6664 is breaking RubyGem's specs because the Build Metadata is not being generated correctly.

This is breaking because the change is checking for the `.git` to determine if the git hash should be fetched for the version string. This folder does not exist in the submodule in RubyGems' repo

### What was your diagnosis of the problem?

See https://travis-ci.org/rubygems/rubygems/jobs/437576972

### What is your fix for the problem, implemented in this PR?

Check if `.git` exists either as a file or folder

Co-authored-by: Colby Swandale <me@colby.fyi>
@colby-swandale colby-swandale added this to the 1.16.7 milestone Oct 12, 2018
@ghost
Copy link
Copy Markdown

ghost commented Oct 12, 2018

Build succeeded

@ghost ghost merged commit 938938f into master Oct 12, 2018
@hsbt hsbt deleted the colby/fix-rubygems-spec-suite branch October 12, 2018 07:29
@hsbt hsbt modified the milestones: 1.16.7, 1.17.0 Oct 17, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants