Skip to content

Commit

Permalink
Merge pull request #2742 from TracksApp/footer-version
Browse files Browse the repository at this point in the history
Fix the Git version in the footer with the Docker image
  • Loading branch information
ZeiP authored Feb 21, 2022
2 parents 4b2c4db + 6ca701f commit f40e3c0
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 19 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.bundle
.git
config/database.yml
config/site.yml
coverage
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ COPY lib /app/lib/
COPY app /app/app/
COPY db /app/db/

COPY .git /app/.git

RUN RAILS_ENV=production bundle exec rake assets:precompile

ENTRYPOINT ["/app/docker-entrypoint.sh"]
Expand Down
3 changes: 2 additions & 1 deletion app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="bootstrap">
<div class="footer">
<%= t('footer.send_feedback', :version => TRACKS_VERSION) %>
<%= t('footer.version', :version => TRACKS_VERSION, :revision_with_date => TRACKS_REVISION_WITH_DATE, :revision => TRACKS_REVISION) %>
<%= t('footer.send_feedback') %>
<span class="footer-line">
<a href="https://github.com/TracksApp/tracks/issues"><%= t('common.bugs')%></a> |
<a href="https://github.com/TracksApp/tracks/wiki"><%= t('common.wiki')%></a> |
Expand Down
10 changes: 3 additions & 7 deletions config/initializers/tracks.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
tracks_version='2.6.0'
# comment out next two lines if you do not want (or can not) the date of the
# last git commit in the footer
info=`git log --pretty=format:"%ai" -1`
tracks_version=tracks_version + ' ('+info+')'

TRACKS_VERSION=tracks_version
TRACKS_VERSION='2.6.0'
TRACKS_REVISION_WITH_DATE=`git log --date=format:'%Y-%m-%d' --pretty=format:"%h @ %ad" -1`
TRACKS_REVISION=`git log --pretty=format:"%h" -1`
3 changes: 2 additions & 1 deletion config/locales/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ cs:
select_feed_for_context: Select the feed for this context
select_feed_for_project: Vyberte feed pro tento projekt
footer:
send_feedback: Poslat zpětnou vazbu na %{version}
version: 'Tracks %{version} (%{revision_with_date})'
send_feedback: Poslat zpětnou vazbu
helpers:
select:
prompt: Выберите
Expand Down
3 changes: 2 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ de:
select_feed_for_context: Feed für diesen Kontext auswählen
select_feed_for_project: Feed für dieses Projekt auswählen
footer:
send_feedback: Senden Sie Feedback zu %{version}
version: 'Tracks %{version} (%{revision_with_date})'
send_feedback: Senden Sie Feedback
helpers:
select:
prompt: Выберите
Expand Down
3 changes: 2 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ en:
select_feed_for_context: Select the feed for this context
select_feed_for_project: Select the feed for this project
footer:
send_feedback: Send feedback on %{version}
version: 'Tracks %{version} (%{revision_with_date})'
send_feedback: Send feedback
helpers:
select:
prompt: Please select
Expand Down
3 changes: 2 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ es:
select_feed_for_context: Seleccione el canal para este contexto
select_feed_for_project: Seleccione el canal para este proyecto
footer:
send_feedback: Envía comentarios sobre la %{version}
version: 'Tracks %{version} (%{revision_with_date})'
send_feedback: Envía comentarios sobre
helpers:
select:
prompt: Seleccione
Expand Down
3 changes: 2 additions & 1 deletion config/locales/fi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ fi:
select_feed_for_context: Valitse tämän asiayhteyden syöte
select_feed_for_project: Valitse tämän projektin syöte
footer:
send_feedback: Lähetä palautetta versiosta %{version}
version: 'Tracks %{version} (%{revision_with_date})'
send_feedback: Lähetä palautetta
helpers:
select:
prompt: Valitse
Expand Down
3 changes: 2 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ fr:
select_feed_for_context: Selectionner un flux pour ce contexte
select_feed_for_project: Selectionner le flux pour ce projet
footer:
send_feedback: Envoyer un feedback sur %{version}
send_feedback: Envoyer un feedback
version: 'Tracks %{version} (%{revision_with_date})'
helpers:
select:
prompt: Veuillez sélectionner
Expand Down
3 changes: 2 additions & 1 deletion config/locales/he.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ he:
select_feed_for_context: בחירת ההזנה עבור ההקשר הנתון
select_feed_for_project: בחירת ההזנה עבור הפרוייקט
footer:
send_feedback: שליחת משוב על גירסא %{version}
send_feedback: שליחת משוב על גירסא
version: 'Tracks %{version} (%{revision_with_date})'
helpers:
select:
prompt: Выберите
Expand Down
3 changes: 2 additions & 1 deletion config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ nl:
select_feed_for_context: Kies de feed voor deze context
select_feed_for_project: Kies de feed voor dit project
footer:
send_feedback: Stuur reactie op %{version}
send_feedback: Stuur reactie
version: 'Tracks %{version} (%{revision_with_date})'
helpers:
select:
prompt: Maak een keuze
Expand Down
3 changes: 2 additions & 1 deletion config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ ru:
select_feed_for_context: Выберите ленту новостей для этого контекста
select_feed_for_project: Выберите ленту новостей для этого проекта
footer:
send_feedback: Обратная связь. Версия %{version}
send_feedback: Обратная связь
version: 'Tracks %{version} (%{revision_with_date})'
helpers:
select:
prompt: Выберите...
Expand Down
3 changes: 2 additions & 1 deletion config/locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ integrations:
yazarak "çamaşırları yıka @ Ev" veya "Mehmet'i Ara > x projesi" ve benzeri türden
görevler oluşturmak için Rich Todo API kullanabilirsiniz.
footer:
send_feedback: Geri bildirim gönderin %{version}
send_feedback: Geri bildirim
version: 'Tracks %{version} (%{revision_with_date})'
helpers:
select:
prompt: Seçiniz
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ See doc/upgrading.md for the upgrade documentation!
* Lots of dependencies have been upgraded.
* Fixed some error messages in import.
* Fixed import in the Docker image.
* Footer shows the Git version hash and date in the Docker image

## Updated translations

Expand Down

0 comments on commit f40e3c0

Please sign in to comment.