mirror of
https://github.com/iv-org/invidious
synced 2025-12-21 23:02:52 +01:00
Add link to GitHub release/tag/commit in footer (#4702)
* Add link to GitHub release/tag/commit in footer * Only show tag if there is one Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --------- Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
This commit is contained in:
parent
65463333f3
commit
994c25de2e
@ -84,6 +84,7 @@ HTTP_CHUNK_SIZE = 10485760 # ~10MB
|
|||||||
CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}
|
CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}
|
||||||
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
|
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
|
||||||
CURRENT_VERSION = {{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}
|
CURRENT_VERSION = {{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}
|
||||||
|
CURRENT_TAG = {{ "#{`git tag --points-at HEAD`.strip}" }}
|
||||||
|
|
||||||
# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
|
# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
|
||||||
# only need to expire modified assets, so we can use this to find the last commit that changes
|
# only need to expire modified assets, so we can use this to find the last commit that changes
|
||||||
|
|||||||
@ -150,7 +150,24 @@
|
|||||||
<i class="icon ion-ios-wallet"></i>
|
<i class="icon ion-ios-wallet"></i>
|
||||||
<a href="https://invidious.io/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
<a href="https://invidious.io/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
||||||
</span>
|
</span>
|
||||||
<span><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %></span>
|
<span>
|
||||||
|
<%= translate(locale, "Current version: ") %>
|
||||||
|
<% if CONFIG.modified_source_code_url %>
|
||||||
|
<a href="<%= CONFIG.modified_source_code_url %>/commit/<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a>
|
||||||
|
<% else %>
|
||||||
|
<a href="https://github.com/iv-org/invidious/commit/<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a>
|
||||||
|
<% end %>
|
||||||
|
@ <%= CURRENT_BRANCH %>
|
||||||
|
<% if CURRENT_TAG != "" %>
|
||||||
|
(
|
||||||
|
<% if CONFIG.modified_source_code_url %>
|
||||||
|
<a href="<%= CONFIG.modified_source_code_url %>/releases/tag/<%= CURRENT_TAG %>"><%= CURRENT_TAG %></a>
|
||||||
|
<% else %>
|
||||||
|
<a href="https://github.com/iv-org/invidious/releases/tag/<%= CURRENT_TAG %>"><%= CURRENT_TAG %></a>
|
||||||
|
<% end %>
|
||||||
|
)
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user