Commit 4d9c47ff authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete unused tasks and config to deploy

parent e051cf28
module.exports = function(grunt) {
require('google-closure-compiler').grunt(grunt);
var revision="unknown", defaultConfig, packageFile, toolsConfig, toolsFile;
var revision="unknown", defaultConfig, packageFile;
var path = require('path');
......@@ -27,31 +27,6 @@ module.exports = function(grunt) {
});
});
grunt.registerTask('setup_tools', 'Initialize tools.', function(){
toolsConfig = 'tools.json';
toolsFile = require('./' + toolsConfig);
if (toolsFile)
grunt.log.ok('Tools config loaded successfully'.green);
else
grunt.log.error().writeln('Could not load config file'.red);
});
grunt.registerTask('cleanup_deploy_folder_init', 'Initialize tools.', function(){
grunt.initConfig({
clean: {
options: {
force: true
},
menu:[
toolsFile['menu_path']
]
}
});
});
grunt.registerTask('cleanup_deploy_folder', ['cleanup_deploy_folder_init', 'clean']);
grunt.registerTask('build_webword_init', 'Initialize build WebWord SDK.', function(){
defaultConfig = './sdk_configs/webword.json';
packageFile = require(defaultConfig);
......@@ -103,16 +78,12 @@ module.exports = function(grunt) {
}
});
grunt.registerTask('build_webword', ['setup_tools', 'build_webword_init', 'build_sdk']);
grunt.registerTask('build_nativeword', ['setup_tools', 'build_nativeword_init', 'build_sdk']);
grunt.registerTask('build_webexcel', ['setup_tools', 'build_webexcel_init', 'build_sdk']);
grunt.registerTask('build_webpowerpoint', ['setup_tools', 'build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('deploy_sdk_all', ['setup_tools', 'build_webword_init', 'deploy_sdk', 'build_webexcel_init', 'deploy_sdk', 'build_webpowerpoint_init', 'deploy_sdk']);
grunt.registerTask('build_all_without_deploy', ['setup_tools', 'build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('build_all', ['build_all_without_deploy', 'deploy_sdk_all']);
grunt.registerTask('cleanup_and_build_all', ['setup_tools', 'cleanup_deploy_folder', 'build_all']);
grunt.registerTask('build_webword', ['build_webword_init', 'build_sdk']);
grunt.registerTask('build_nativeword', ['build_nativeword_init', 'build_sdk']);
grunt.registerTask('build_webexcel', ['build_webexcel_init', 'build_sdk']);
grunt.registerTask('build_webpowerpoint', ['build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('up_sdk_src_init', 'Update SDK source', function() {
grunt.initConfig({
......@@ -134,36 +105,7 @@ module.exports = function(grunt) {
grunt.registerTask('update_sources_webpowerpoint', ['build_webpowerpoint_init', 'up_sdk_src_init', 'exec']);
grunt.registerTask('update_sources', ['update_sources_webword', 'update_sources_webexcel', 'update_sources_webpowerpoint']);
grunt.registerTask('commit_logs_init', function() {
var build_num = packageFile['info']['build'];
var svn_rev = packageFile['update_src']['revision'];
if(undefined !== process.env['BUILD_NUMBER'])
build_num = parseInt(process.env['BUILD_NUMBER']);
if(undefined !== process.env['SVN_REVISION'])
svn_rev = parseInt(process.env['SVN_REVISION']);
var commit_message ='\"Version: '+ packageFile['info']['version'] +
' (build:' + build_num + ')' +
' from svn rev: ' + svn_rev + '\"';
grunt.initConfig({
exec: {
store_log: {
command: 'svn.exe commit ' + packageFile['deploy']['store_log']['dst'] + ' -q -m ' + commit_message,
stdout: false
}
}
});
});
grunt.registerTask('commit_logs_webword', ['build_webword_init', 'commit_logs_init', 'exec']);
grunt.registerTask('commit_logs_webexcel', ['build_webexcel_init', 'commit_logs_init', 'exec']);
grunt.registerTask('commit_logs_webpowerpoint', ['build_webpowerpoint_init', 'commit_logs_init', 'exec']);
grunt.registerTask('commit_logs', ['commit_logs_webword', 'commit_logs_webexcel', 'commit_logs_webpowerpoint']);
grunt.registerTask('increment_build', function() {
var pkg = grunt.file.readJSON(defaultConfig);
pkg.info.build = parseInt(pkg.info.build) + 1;
......@@ -253,15 +195,6 @@ module.exports = function(grunt) {
grunt.registerTask('compile_sdk_native', ['compile_sdk_init:ADVANCED', 'closure-compiler:sdk', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk_native_fast', ['compile_sdk_init:WHITESPACE_ONLY', 'closure-compiler:sdk', 'concat', 'replace', 'clean']);
grunt.registerTask('deploy_sdk_init', function() {
grunt.initConfig({
pkg: grunt.file.readJSON(toolsConfig),
copy: packageFile['deploy']['copy']
});
});
grunt.registerTask('deploy_sdk', ['deploy_sdk_init', 'copy']);
grunt.registerTask('default', ['get_svn_info', 'build_all_without_deploy']);
grunt.registerTask('default', ['get_svn_info', 'build_all']);
};
\ No newline at end of file
......@@ -192,70 +192,6 @@
"url": "http://localhost:8080/sdkjs/cell"
}
},
"deploy": {
"copy": {
"common": {
"expand": true,
"cwd": "../../common/Charts/",
"src": "DrawingObjects.js",
"dest": "<%= pkg.menu_path %>/cell/model/"
},
"api": {
"expand": true,
"cwd": "../../cell/",
"src": [
"../common/apiBase.js",
"api.js",
"apiDefines.js",
"view/EventsController.js",
"view/HandlerList.js",
"../common/AdvancedOptions.js",
"model/CellInfo.js",
"model/CellComment.js",
"utils/utils.js",
"css/*.css"
],
"dest": "<%= pkg.menu_path %>/cell/"
},
"sdk": {
"expand": true,
"cwd": "../../cell/",
"src": "sdk-all.js",
"dest": "<%= pkg.menu_path %>/cell/"
},
"doc": {
"expand": true,
"cwd": "../../cell/",
"src": "document/**",
"dest": "<%= pkg.menu_path %>/cell/"
},
"log": {
"expand": true,
"cwd": "../../cell/",
"src": "sdk-all.js.map",
"dest": "<%= pkg.menu_path %>/cell/"
},
"samlpe": {
"expand": true,
"cwd": "../../cell/",
"src": "Spreadsheet.html.deploy",
"dest": "<%= pkg.menu_path %>/cell/"
},
"samlpe_files": {
"expand": true,
"cwd": "../../cell/",
"src": [
"jquery/jquery-1.7.1.js",
"css/nav-buttons.png",
"css/gradient.png"
],
"dest": "<%= pkg.menu_path %>/cell/"
}
},
"store_log": {
"dst": "../../cell/Build/Log"
}
},
"tasks": {
"build": [
"increment_build",
......
......@@ -174,56 +174,6 @@
"url": "http://localhost:8080/sdkjs/slide"
}
},
"deploy": {
"copy": {
"api": {
"expand": true,
"cwd": "../../slide/",
"src": [
"../common/apiBase.js",
"api.js",
"apiCommon.js",
"apiDefines.js"
],
"dest": "<%= pkg.menu_path %>/slide/"
},
"sdk": {
"expand": true,
"cwd": "../../slide/",
"src": [
"sdk-all.js",
"themes/theme*/**"
],
"dest": "<%= pkg.menu_path %>/slide/"
},
"doc": {
"expand": true,
"cwd": "../../slide/",
"src": "document/**",
"dest": "<%= pkg.menu_path %>/slide/"
},
"log": {
"expand": true,
"cwd": "../../slide/",
"flatten": true,
"src": [
"sdk-all.js.map",
"Build/Log/property.map",
"Build/Log/variable.map"
],
"dest": "<%= pkg.menu_path %>/slide/"
},
"sample": {
"expand": true,
"cwd": "../../slide/",
"src": "index.html.deploy",
"dest": "<%= pkg.menu_path %>/slide/"
}
},
"store_log": {
"dst": "../../slide/Build/Log"
}
},
"tasks": {
"build": [
"increment_build",
......
......@@ -178,59 +178,6 @@
"url": "http://localhost:8080/sdkjs/word"
}
},
"deploy": {
"copy": {
"api": {
"expand": true,
"cwd": "../../word/",
"src": [
"../common/apiBase.js",
"api.js",
"apiCommon.js",
"apiDefines.js"
],
"dest": "<%= pkg.menu_path %>/word/"
},
"sdk": {
"expand": true,
"cwd": "../../word/",
"src": "sdk-all.js",
"dest": "<%= pkg.menu_path %>/word/"
},
"doc": {
"expand": true,
"cwd": "../../word/",
"src": "document/**",
"dest": "<%= pkg.menu_path %>/word/"
},
"apisettings": {
"expand": true,
"cwd": "../../common/",
"src": [
"spellcheckapisettings.js",
"commonDefines.js",
"apiCommon.js",
"downloaderfiles.js",
"Images/*.cur",
"Native/jquery_native.js",
"Native/native.js"
],
"dest": "<%= pkg.menu_path %>/common/"
},
"log": {
"expand": true,
"cwd": "../../word/",
"src": [
"Build/Log/property.map",
"Build/Log/variable.map"
],
"dest": "<%= pkg.menu_path %>/word/"
}
},
"store_log": {
"dst": "../../word/Build/Log"
}
},
"tasks": {
"build": [
"increment_build",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment