Skip to content
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

Show version number in footer #340 #353

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,29 @@
</main>

<footer class="footer bg-light mt-auto py-4">
<div class="container text-center">
© <%= Date.today.year %>
<a href="https://betadots.de/" class="text-dark">
<%= image_tag "betadots.png", alt: "betadots logo", width: "32", height: "32" %>
betadots GmbH
</a>
-
Licensed under
<a href="https://github.com/betadots/hdm/blob/main/LICENSE">
GNU Affero General Public License v3.0
</a>
-
<a href="https://github.com/betadots/hdm">
<%= icon("github") %>
Source code
</a>
<div class="container">
<div class="row">
<div class="col text-end">
<span class="font-monospace"><%= Hdm::VERSION %></span>
<br>
© <%= Date.today.year %>
<a href="https://betadots.de/" class="text-dark">
<%= image_tag "betadots.png", alt: "betadots logo", width: "32", height: "32" %>
betadots GmbH
</a>
</div>
<div class="col">
Licensed under
<a href="https://github.com/betadots/hdm/blob/main/LICENSE">
GNU Affero General Public License v3.0
</a>
<br>
<a href="https://github.com/betadots/hdm">
<%= icon("github") %>
Source code
</a>
</div>
</div>
</div>
</footer>
<%= yield :modals %>
Expand Down
6 changes: 6 additions & 0 deletions config/initializers/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Hdm::VERSION =
if system("git --version >>/dev/null 2>&1")
`git describe`.chomp
else
"unknown"
end