From 88b54920e58cbead71b6680e4b8c9a722c50e621 Mon Sep 17 00:00:00 2001 From: HighwayChile Date: Tue, 3 Jun 2014 22:02:56 -0700 Subject: [PATCH] grunt writes build timestamp, read into about view --- src/brackets.config.json | 3 ++- src/config.json | 3 ++- src/help/HelpCommandHandlers.js | 1 + src/htmlContent/about-dialog.html | 7 ++++++- src/nls/root/strings.js | 1 + tasks/write-config.js | 3 ++- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/brackets.config.json b/src/brackets.config.json index 2302c8ffb..5c51058a5 100644 --- a/src/brackets.config.json +++ b/src/brackets.config.json @@ -19,6 +19,7 @@ "extension_listing_url" : "", "extension_registry" : "https://s3.amazonaws.com/extend.brackets/registry.json", "extension_url" : "https://s3.amazonaws.com/extend.brackets/{0}/{0}-{1}.zip", - "linting.enabled_by_default" : true + "linting.enabled_by_default" : true, + "build_timestamp" : "" } } diff --git a/src/config.json b/src/config.json index f6688df38..940a71509 100644 --- a/src/config.json +++ b/src/config.json @@ -18,7 +18,8 @@ "extension_listing_url": "", "extension_registry": "https://s3.amazonaws.com/extend.brackets/registry.json", "extension_url": "https://s3.amazonaws.com/extend.brackets/{0}/{0}-{1}.zip", - "linting.enabled_by_default": true + "linting.enabled_by_default": true, + "build_timestamp": "DEBUG" }, "name": "Brackets", "version": "0.41.0-0", diff --git a/src/help/HelpCommandHandlers.js b/src/help/HelpCommandHandlers.js index 2ed722a82..3d0b5a9bc 100644 --- a/src/help/HelpCommandHandlers.js +++ b/src/help/HelpCommandHandlers.js @@ -75,6 +75,7 @@ define(function (require, exports, module) { var templateVars = { ABOUT_ICON : brackets.config.about_icon, APP_NAME_ABOUT_BOX : brackets.config.app_name_about, + BUILD_TIMESTAMP : brackets.config.build_timestamp, BUILD_INFO : buildInfo || "", Strings : Strings }; diff --git a/src/htmlContent/about-dialog.html b/src/htmlContent/about-dialog.html index cc668884f..7e121987c 100644 --- a/src/htmlContent/about-dialog.html +++ b/src/htmlContent/about-dialog.html @@ -7,7 +7,12 @@

{{APP_NAME_ABOUT_BOX}}

-

{{Strings.ABOUT_TEXT_LINE1}} {{BUILD_INFO}}

+

{{Strings.ABOUT_TEXT_LINE1}} {{BUILD_INFO}} + {{#BUILD_TIMESTAMP}} +
{{Strings.ABOUT_TEXT_BUILD_TIMESTAMP}}{{BUILD_TIMESTAMP}} + {{/BUILD_TIMESTAMP}} +

+

Copyright 2012 - 2014 Adobe Systems Incorporated and its licensors. All rights reserved.

{{{Strings.ABOUT_TEXT_WEB_PLATFORM_DOCS}}}

{{{Strings.ABOUT_TEXT_LINE3}}}

diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index cc023f226..28b139485 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -386,6 +386,7 @@ define({ "ABOUT" : "About", "CLOSE" : "Close", "ABOUT_TEXT_LINE1" : "sprint {VERSION_MINOR} {BUILD_TYPE} {VERSION}", + "ABOUT_TEXT_BUILD_TIMESTAMP" : "build timestamp: ", "ABOUT_TEXT_LINE3" : "Notices, terms and conditions pertaining to third party software are located at {ADOBE_THIRD_PARTY} and incorporated by reference herein.", "ABOUT_TEXT_LINE4" : "Documentation and source at https://github.com/adobe/brackets/", "ABOUT_TEXT_LINE5" : "Made with \u2764 and JavaScript by:", diff --git a/tasks/write-config.js b/tasks/write-config.js index 6fa4a68f7..ad94a6c8f 100644 --- a/tasks/write-config.js +++ b/tasks/write-config.js @@ -42,7 +42,7 @@ module.exports = function (grunt) { }); // task: build-config - grunt.registerTask("build-config", "Update config.json with the branch and SHA being built", function () { + grunt.registerTask("build-config", "Update config.json with the build timestamp, branch and SHA being built", function () { var done = this.async(), distConfig = grunt.file.readJSON("src/config.json"); @@ -50,6 +50,7 @@ module.exports = function (grunt) { distConfig.version = distConfig.version.substr(0, distConfig.version.lastIndexOf("-") + 1) + gitInfo.commits; distConfig.repository.SHA = gitInfo.sha; distConfig.repository.branch = gitInfo.branch; + distConfig.config.build_timestamp = new Date().toString().split('(')[0].trim(); common.writeJSON(grunt, "dist/config.json", distConfig);