Skip to content

Commit

Permalink
Merge pull request #1414 from codidact/0valt/version-utc
Browse files Browse the repository at this point in the history
Latest version timestamp format fixup
  • Loading branch information
cellio authored Sep 22, 2024
2 parents 0c4ca05 + 9cdd50b commit 6f50c62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div class="footer--container container">
<div class="grid">
<div class="grid--cell is-6 is-12-md is-12-sm">
<ul>
<ul>
<li><%= link_to 'Our Communities', '/dashboard' %></li>
<li><%= link_to 'About Us', '/policy/network-faq' %></li>
</ul>
</ul>
</div>
<div class="grid--cell is-6 is-12-md is-12-sm">
<ul>
Expand All @@ -16,7 +16,9 @@
</div>
</div>
<% commit = Rails.cache.persistent('current_commit') %>
<p>Powered by <%= link_to 'Codidact', 'https://codidact.org/' %>. Version <%= link_to commit[0][0..7], "https://github.com/codidact/qpixel/commit/#{commit[0]}" %> (<%= commit[1] %>)
<p>Powered by <%= link_to 'Codidact', 'https://codidact.org/' %>. Version <%=
link_to commit[0][0..7], "https://github.com/codidact/qpixel/commit/#{commit[0]}"
%> (<%= DateTime.iso8601(commit[1]).to_time.utc.strftime('%F %TZ') %>)
</p>
</div>
</footer>
2 changes: 1 addition & 1 deletion config/initializers/zz_cache_setup.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Rails.cache.persistent 'current_commit', clear: true do
[`git rev-parse HEAD`.strip, `git log -1 --date=iso --pretty=format:%cd`.strip]
[`git rev-parse HEAD`.strip, `git log -1 --date=iso-strict --pretty=format:%cd`.strip]
end

0 comments on commit 6f50c62

Please sign in to comment.