-
Notifications
You must be signed in to change notification settings - Fork 663
Display reported build information in a badge and on crate version pages #764
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
Closed
shepmaster
wants to merge
8
commits into
rust-lang:master
from
integer32llc:build-info-detailed-page
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f46203f
Store version build info uploaded by cargo in the database, also return
carols10cents 6f7b34e
Display the latest version and targets this crate version builds on
carols10cents a5dc651
Show badge for latest version build status on crate list pages
carols10cents c492420
Show detailed build information on a separate page
shepmaster 231d7e2
Merge remote-tracking branch 'upstream/master' into build-info-detail…
carols10cents 6cdb0e7
Failing test for build info JSON key mismatches
carols10cents 881ff2c
Change date format in build-info ordering and use SVG instead of PNG
jtgeibel 6c9794d
Swap order of semver comparison when returning search results
jtgeibel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Show badge for latest version build status on crate list pages
If the latest version builds on any stable version, show that it builds on stable. If not and it builds on any beta version, show that. If not and it builds on any nightly version, show that. Otherwise, don't show any badge.
- Loading branch information
commit a5dc65170c7805f734a57b19933f3406afc8c33c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Ember from 'ember'; | ||
|
||
import { formatDay } from 'cargo/helpers/format-day'; | ||
|
||
export default Ember.Component.extend({ | ||
tagName: 'span', | ||
classNames: ['build_info'], | ||
|
||
build_info: Ember.computed('crate.max_build_info_stable', 'crate.max_build_info_beta', 'crate.max_build_info_nightly', function() { | ||
if (this.get('crate.max_build_info_stable')) { | ||
return 'stable'; | ||
} else if (this.get('crate.max_build_info_beta')) { | ||
return 'beta'; | ||
} else if (this.get('crate.max_build_info_nightly')) { | ||
return 'nightly'; | ||
} else { | ||
return null; | ||
} | ||
}), | ||
color: Ember.computed('build_info', function() { | ||
if (this.get('build_info') === 'stable') { | ||
return 'brightgreen'; | ||
} else if (this.get('build_info') === 'beta') { | ||
return 'yellow'; | ||
} else { | ||
return 'orange'; | ||
} | ||
}), | ||
version_display: Ember.computed('build_info', 'crate.max_build_info_stable', 'crate.max_build_info_beta', 'crate.max_build_info_nightly', function() { | ||
if (this.get('build_info') === 'stable') { | ||
return this.get('crate.max_build_info_stable'); | ||
} else if (this.get('build_info') === 'beta') { | ||
return formatDay(this.get('crate.max_build_info_beta')); | ||
} else { | ||
return formatDay(this.get('crate.max_build_info_nightly')); | ||
} | ||
}), | ||
version_for_shields: Ember.computed('version_display', function() { | ||
return this.get('version_display').replace(/-/g, '--'); | ||
}), | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{#if build_info}} | ||
<img | ||
src="https://img.shields.io/badge/builds_on-{{ version_for_shields }}-{{color}}.svg" | ||
alt="Known to build on {{ build_info }} {{ version_display }}" | ||
title="Known to build on {{ build_info }} {{ version_display }}" /> | ||
{{/if}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the
created_at
andupdated_at
fields ever used at all? Is it worth even having them in the first place?