Add app.version play config and have the value exposed via the config API. (#447)

This commit is contained in:
Mars Lan 2017-04-18 18:06:26 -07:00
parent 9e95091ca7
commit b2f0eaaf9d
2 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,7 @@ import security.AuthenticationManager;
public class Application extends Controller
{
private static String TREE_NAME_SUBFIX = ".tree.name";
private static final String APP_VERSION = Play.application().configuration().getString("app.version");
private static final String PIWIK_SITE_ID = Play.application().configuration().getString("tracking.piwik.siteid");
private static final String PIWIK_URL = Play.application().configuration().getString("tracking.piwik.url");
private static final Boolean IS_INTERNAL = Play.application().configuration().getBoolean("linkedin.internal", false);
@ -78,6 +79,7 @@ public class Application extends Controller
ObjectNode response = Json.newObject();
ObjectNode config = Json.newObject();
config.put("appVersion", APP_VERSION);
config.put("isInternal", IS_INTERNAL);
config.put("tracking", trackingInfo());
response.put("status", "ok");

View File

@ -44,6 +44,8 @@ play.i18n.langs = [ "en" ]
# You can disable evolutions for a specific datasource if necessary
# play.evolutions.db.default.enabled=false
app.version = "$YOUR_APP_VERSION"
datasets.tree.name = "/var/tmp/wherehows/resource/dataset.json"
datasets.tree.name = ${?DATASETS_TREE_NAME}
flows.tree.name = "/var/tmp/wherehows/resource/flow.json"