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

Commit

Permalink
Adding a pre release build step (#14360)
Browse files Browse the repository at this point in the history
* adding a new grunt task to generate pre-release builds with the proper auto update url

* fixing eslint issues

* further changes to pre release builds

* fixing the access of config obj
  • Loading branch information
vickramdhawal authored and swmitra committed May 28, 2018
1 parent 6022b48 commit 288449b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 10 deletions.
16 changes: 13 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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']);
};
3 changes: 2 additions & 1 deletion src/brackets.config.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/<locale>.json"
}
3 changes: 2 additions & 1 deletion src/brackets.config.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
1 change: 0 additions & 1 deletion src/brackets.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions src/brackets.config.prerelease.json
Original file line number Diff line number Diff line change
@@ -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/<locale>.json"
}
6 changes: 3 additions & 3 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/<locale>.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",
Expand All @@ -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/<locale>.json"
},
"name": "Brackets",
"version": "1.13.0-0",
Expand Down Expand Up @@ -99,4 +99,4 @@
"url": "https://github.com/adobe/brackets/blob/master/LICENSE"
}
]
}
}
1 change: 1 addition & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
6 changes: 5 additions & 1 deletion src/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tasks/write-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 288449b

Please sign in to comment.