Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1636 from adobe/nj/update-config
Browse files Browse the repository at this point in the history
Move update info URL to package.json
  • Loading branch information
gruehle committed Sep 12, 2012
2 parents 92d946f + e13124c commit 3f889e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"about_icon" : "styles/images/brackets_icon.svg",
"show_debug_menu" : true,
"enable_jslint" : true,
"forum_url" : "https://groups.google.com/forum/?fromgroups#!forum/brackets-dev"
"forum_url" : "https://groups.google.com/forum/?fromgroups#!forum/brackets-dev",
"update_info_url" : "http://dev.brackets.io/updates/stable/"
}
}
7 changes: 4 additions & 3 deletions src/utils/UpdateNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ define(function (require, exports, module) {
NativeApp = require("utils/NativeApp"),
PreferencesManager = require("preferences/PreferencesManager"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils");
StringUtils = require("utils/StringUtils"),
Global = require("utils/Global");

// Extract current build number from package.json version field 0.0.0-0
var _buildNumber = /-([0-9]+)/.exec(brackets.metadata.version)[1];
Expand All @@ -55,7 +56,7 @@ define(function (require, exports, module) {
// you force an update check it is always loaded.

// URL to fetch the version information.
var _versionInfoURL = "http://dev.brackets.io/updates/stable/"; // {locale}.json will be appended
var _versionInfoURL;

// Information on all posted builds of Brackets. This is an Array, where each element is
// an Object with the following fields:
Expand Down Expand Up @@ -344,7 +345,7 @@ define(function (require, exports, module) {
}

// Append locale to version info URL
_versionInfoURL += (window.localStorage.getItem("locale") || brackets.app.language) + ".json";
_versionInfoURL = brackets.config.update_info_url + (window.localStorage.getItem("locale") || brackets.app.language) + ".json";

// Define public API
exports.checkForUpdate = checkForUpdate;
Expand Down

0 comments on commit 3f889e4

Please sign in to comment.