1
0
mirror of https://github.com/adobe/brackets.git synced 2024-11-20 09:53:00 +01:00

grunt writes build timestamp, read into about view

This commit is contained in:
HighwayChile 2014-06-03 22:02:56 -07:00
parent 49d489f351
commit 88b54920e5
6 changed files with 14 additions and 4 deletions

View File

@ -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" : ""
}
}

View File

@ -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",

View File

@ -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
};

View File

@ -7,7 +7,12 @@
<div class="about-text">
<h2>{{APP_NAME_ABOUT_BOX}}</h2>
<div class="about-info">
<p class="dialog-message">{{Strings.ABOUT_TEXT_LINE1}} <span id="about-build-number">{{BUILD_INFO}}</span></p>
<p class="dialog-message">{{Strings.ABOUT_TEXT_LINE1}} <span id="about-build-number">{{BUILD_INFO}}</span>
{{#BUILD_TIMESTAMP}}
<br><span class="dialog-message">{{Strings.ABOUT_TEXT_BUILD_TIMESTAMP}}{{BUILD_TIMESTAMP}}</span>
{{/BUILD_TIMESTAMP}}
</p>
<p class="dialog-message"><!-- $NON-NLS$ -->Copyright 2012 - 2014 Adobe Systems Incorporated and its licensors. All rights reserved.</p>
<p class="dialog-message">{{{Strings.ABOUT_TEXT_WEB_PLATFORM_DOCS}}}</p>
<p class="dialog-message">{{{Strings.ABOUT_TEXT_LINE3}}}</p>

View File

@ -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 <a href='{ADOBE_THIRD_PARTY}'>{ADOBE_THIRD_PARTY}</a> and incorporated by reference herein.",
"ABOUT_TEXT_LINE4" : "Documentation and source at <a href='https://github.com/adobe/brackets/'>https://github.com/adobe/brackets/</a>",
"ABOUT_TEXT_LINE5" : "Made with \u2764 and JavaScript by:",

View File

@ -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);