From 5819447828caaef4d07ce29e102e8d7f038be2fb Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 25 Sep 2016 18:49:16 +0800 Subject: [PATCH] fix git versioning --- app/assets/javascripts/src/Metamaps.Erb.js.erb | 2 ++ app/views/layouts/_lightboxes.html.erb | 2 ++ config/initializers/version.rb | 3 ++- frontend/src/Metamaps/index.js | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/src/Metamaps.Erb.js.erb b/app/assets/javascripts/src/Metamaps.Erb.js.erb index 60b64e46..e8f3a25b 100644 --- a/app/assets/javascripts/src/Metamaps.Erb.js.erb +++ b/app/assets/javascripts/src/Metamaps.Erb.js.erb @@ -18,3 +18,5 @@ Metamaps.Erb['sounds/MM_sounds.mp3'] = '<%= asset_path 'sounds/MM_sounds.mp3' %> Metamaps.Erb['sounds/MM_sounds.ogg'] = '<%= asset_path 'sounds/MM_sounds.ogg' %>' Metamaps.Metacodes = <%= Metacode.all.to_json.gsub(%r[(icon.*?)(\"},)], '\1?purple=stupid\2').html_safe %> Metamaps.VERSION = '<%= METAMAPS_VERSION %>' +Metamaps.BUILD = '<%= METAMAPS_BUILD %>' +Metamaps.LAST_UPDATED = '<%= METAMAPS_LAST_UPDATED %>' diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 89b5a6b4..42c959d6 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -13,12 +13,14 @@

STATUS:

VERSION:

+

BUILD:

LAST UPDATE:

PRIVATE BETA

<%= METAMAPS_VERSION %>

+

<%= METAMAPS_BUILD %>

<%= METAMAPS_LAST_UPDATED %>

diff --git a/config/initializers/version.rb b/config/initializers/version.rb index ff08c330..be0330c3 100644 --- a/config/initializers/version.rb +++ b/config/initializers/version.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true -METAMAPS_VERSION = '2 build `git log -1 --pretty=%H`' +METAMAPS_VERSION = '2.9' +METAMAPS_BUILD = `git log -1 --pretty=%H`.chomp.freeze METAMAPS_LAST_UPDATED = `git log -1 --pretty='%ad'`.split(' ').values_at(1, 2, 4).join(' ').freeze diff --git a/frontend/src/Metamaps/index.js b/frontend/src/Metamaps/index.js index e1aa8b34..21a3fb8d 100644 --- a/frontend/src/Metamaps/index.js +++ b/frontend/src/Metamaps/index.js @@ -31,6 +31,7 @@ import Util from './Util' import Views from './Views' import Visualize from './Visualize' +Metamaps = window.Metamaps || {} Metamaps.Account = Account Metamaps.Active = Active Metamaps.Admin = Admin