diff --git a/Gruntfile.js b/Gruntfile.js index 78c3b4f6986..fe7e2d0a1d0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -393,9 +393,7 @@ module.exports = function (grunt) { // Update version number in package.json and rewrite src/config.json grunt.registerTask('set-release', ['update-release-number', 'write-config:dev']); - // task: build - grunt.registerTask('build', [ - 'write-config:dist', + grunt.registerTask('build-common', [ 'eslint:src', 'jasmine', 'clean', @@ -414,6 +412,18 @@ module.exports = function (grunt) { 'build-config' ]); + // task: build + grunt.registerTask('build', [ + 'write-config:dist', + 'build-common' + ]); + + // task: build + grunt.registerTask('build-prerelease', [ + 'write-config:prerelease', + 'build-common' + ]); + // Default task. grunt.registerTask('default', ['test']); }; diff --git a/src/brackets.config.dev.json b/src/brackets.config.dev.json index 8f567b28d21..efe16154593 100644 --- a/src/brackets.config.dev.json +++ b/src/brackets.config.dev.json @@ -2,5 +2,6 @@ "healthDataServerURL" : "https://healthdev.brackets.io/healthDataLog", "analyticsDataServerURL" : "https://cc-api-data-stage.adobe.io/ingest", "serviceKey" : "brackets-service", - "environment" : "stage" + "environment" : "stage", + "update_info_url" : "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/.json" } diff --git a/src/brackets.config.dist.json b/src/brackets.config.dist.json index e84b7671072..df7e8b28384 100644 --- a/src/brackets.config.dist.json +++ b/src/brackets.config.dist.json @@ -2,5 +2,6 @@ "healthDataServerURL" : "https://health.brackets.io/healthDataLog", "analyticsDataServerURL" : "https://cc-api-data.adobe.io/ingest", "serviceKey" : "brackets-service", - "environment" : "production" + "environment" : "production", + "update_info_url" : "https://getupdates.brackets.io/getupdates/" } diff --git a/src/brackets.config.json b/src/brackets.config.json index 89a0db49067..12f8d25b1aa 100644 --- a/src/brackets.config.json +++ b/src/brackets.config.json @@ -4,7 +4,6 @@ "app_title" : "Brackets", "app_name_about" : "Brackets", "about_icon" : "styles/images/brackets_icon.svg", - "update_info_url" : "https://getupdates.brackets.io/getupdates/", "how_to_use_url" : "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets", "support_url" : "https://github.com/adobe/brackets/wiki/Troubleshooting", "suggest_feature_url" : "https://github.com/adobe/brackets/wiki/Suggest-a-Feature", diff --git a/src/brackets.config.prerelease.json b/src/brackets.config.prerelease.json new file mode 100644 index 00000000000..08d76fc1dda --- /dev/null +++ b/src/brackets.config.prerelease.json @@ -0,0 +1,7 @@ +{ + "healthDataServerURL" : "https://health.brackets.io/healthDataLog", + "analyticsDataServerURL" : "https://cc-api-data.adobe.io/ingest", + "serviceKey" : "brackets-service", + "environment" : "prerelease", + "update_info_url" : "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/.json" +} diff --git a/src/config.json b/src/config.json index 4158ed87d04..26d7b240ddb 100644 --- a/src/config.json +++ b/src/config.json @@ -3,7 +3,6 @@ "app_title": "Brackets", "app_name_about": "Brackets", "about_icon": "styles/images/brackets_icon.svg", - "update_info_url": "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/.json", "how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets", "support_url": "https://github.com/adobe/brackets/wiki/Troubleshooting", "suggest_feature_url": "https://github.com/adobe/brackets/wiki/Suggest-a-Feature", @@ -23,7 +22,8 @@ "healthDataServerURL": "https://healthdev.brackets.io/healthDataLog", "analyticsDataServerURL": "https://cc-api-data-stage.adobe.io/ingest", "serviceKey": "brackets-service", - "environment": "stage" + "environment": "stage", + "update_info_url": "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/.json" }, "name": "Brackets", "version": "1.13.0-0", @@ -99,4 +99,4 @@ "url": "https://github.com/adobe/brackets/blob/master/LICENSE" } ] -} +} \ No newline at end of file diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index da41461aadf..1e856955636 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -457,6 +457,7 @@ define({ "EXPERIMENTAL_BUILD" : "experimental build", "RELEASE_BUILD" : "build", "DEVELOPMENT_BUILD" : "development build", + "PRERELEASE_BUILD" : "prerelease build", "RELOAD_FROM_DISK" : "Reload from Disk", "KEEP_CHANGES_IN_EDITOR" : "Keep Changes in Editor", "CLOSE_DONT_SAVE" : "Close (Don't Save)", diff --git a/src/strings.js b/src/strings.js index f7da33aba47..57c1b910ed3 100644 --- a/src/strings.js +++ b/src/strings.js @@ -56,7 +56,11 @@ define(function (require, exports, module) { if (isDevBuild) { additionalGlobals.BUILD_TYPE = strings.DEVELOPMENT_BUILD; } else { - additionalGlobals.BUILD_TYPE = strings.RELEASE_BUILD; + if (brackets.config.environment === 'production') { + additionalGlobals.BUILD_TYPE = strings.RELEASE_BUILD; + } else { + additionalGlobals.BUILD_TYPE = strings.PRERELEASE_BUILD; + } } // Insert application strings diff --git a/tasks/write-config.js b/tasks/write-config.js index 46f54c400eb..d87b1fbce91 100644 --- a/tasks/write-config.js +++ b/tasks/write-config.js @@ -34,6 +34,8 @@ module.exports = function (grunt) { var name = "dev"; if (this.flags.dist === true) { name = "dist"; + } else if (this.flags.prerelease === true) { + name = "prerelease"; } var appConfigJSON = grunt.file.readJSON("src/brackets.config.json"),