-
Notifications
You must be signed in to change notification settings - Fork 0
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
Version footer magic 🎩 #13
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0734fe8
add xray rails to look at pretty views
f4c74d2
overrides hyrax footer and turns constant into a link to github with the
92cbc1c
looks at the actual issue on asc repo and sees links to help articles on
920cb6b
* adds version info to template
99ed811
adds bug fix from Bess
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
There are no files selected for viewing
This file contains 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 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 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 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,20 @@ | ||
<footer class="navbar navbar-inverse site-footer"> | ||
<div class="container-fluid"> | ||
<div class="navbar-text text-left"> | ||
<p><%= t('hyrax.footer.service_html') %></p> | ||
<p><%= t('hyrax.product_name') %> v<%= Hyrax::VERSION %></p> | ||
</div> | ||
<div class="navbar-right"> | ||
<div class="navbar-text text-right"> | ||
<p><%= t('hyrax.footer.copyright_html') %></p> | ||
<p><%= t('hyrax.background_attribution_html') %></p> | ||
<br>TEAM2 Version | ||
<br>ENV: <%= Rails.env %> | ||
<br>SHA: <%= link_to(GIT_SHA, "https://github.com/RepoCamp/ascteam2/commit/#{GIT_SHA}") %> | ||
<br>Branch: <%= BRANCH %> | ||
<br>Updated: <%= LAST_DEPLOYED %> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</footer> |
This file contains 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 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,26 @@ | ||
revisions_logfile = "/opt/#{ENV['PROJECT_NAME']}/revisions.log" | ||
GIT_SHA = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
`tail -1 #{revisions_logfile}`.chomp.split(" ")[3].gsub(/\)$/, '') | ||
elsif Rails.env.development? || Rails.env.test? | ||
`git rev-parse HEAD`.chomp | ||
else | ||
"Unknown SHA" | ||
end | ||
|
||
BRANCH = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
`tail -1 #{revisions_logfile}`.chomp.split(" ")[1] | ||
elsif Rails.env.development? || Rails.env.test? | ||
`git rev-parse --abbrev-ref HEAD`.chomp | ||
else | ||
"Unknown branch" | ||
end | ||
|
||
LAST_DEPLOYED = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
deployed = `tail -1 #{revisions_logfile}`.chomp.split(" ")[7] | ||
Date.parse(deployed).strftime("%d %B %Y") | ||
else | ||
"Not in deployed environment" | ||
end |
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.
I am working on adding this my org's Sufia, and I can't remember what this line's purpose is. Anyone remember?
cc: @bess
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.
i think it was a deployment bugfix, rather than related to the git footer? short of the
ENV['PROJECT_NAME']
being called in config/initializers/git_sha.rb, i can't find any instances of the ENV hash in this PR?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.
Ahh, yes, that rings a bell! Thanks @malantonio, hope all's well.