Commit ec040d4a authored by Alexey.Golubev's avatar Alexey.Golubev

added build number from jenkins env

parent f42630b4
...@@ -114,16 +114,22 @@ module.exports = function(grunt) { ...@@ -114,16 +114,22 @@ module.exports = function(grunt) {
grunt.registerTask('update_sources_webpowerpoint', ['build_webpowerpoint_init', 'up_sdk_src_init', 'exec']); 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('update_sources', ['update_sources_webword', 'update_sources_webexcel', 'update_sources_webpowerpoint']);
grunt.registerTask('add_build_number', function() {
var pkg = grunt.file.readJSON(defaultConfig);
if(undefined !== process.env['BUILD_NUMBER']) {
grunt.log.ok('Use Jenkins build number as sdk-all build number!'.yellow);
packageFile['info']['build'] = parseInt(process.env['BUILD_NUMBER']);
pkg.info.build = packageFile['info']['build'];
packageFile['info']['rev'] = process.env['SVN_REVISION'] || revision;
grunt.file.write(defaultConfig, JSON.stringify(pkg, null, 4));
}
});
grunt.registerTask('increment_build', function() { grunt.registerTask('increment_build', function() {
var pkg = grunt.file.readJSON(defaultConfig); var pkg = grunt.file.readJSON(defaultConfig);
pkg.info.build = parseInt(pkg.info.build) + 1; pkg.info.build = parseInt(pkg.info.build) + 1;
if(undefined !== process.env['BUILD_NUMBER']) {
grunt.log.ok('Use Jenkins build number as sdk-all build number!'.yellow);
packageFile['info']['build'] = parseInt(process.env['BUILD_NUMBER']);
pkg.info.build = packageFile['info']['build'];
}
packageFile['info']['rev'] = process.env['SVN_REVISION'] || revision; packageFile['info']['rev'] = process.env['SVN_REVISION'] || revision;
grunt.file.write(defaultConfig, JSON.stringify(pkg, null, 4)); grunt.file.write(defaultConfig, JSON.stringify(pkg, null, 4));
}); });
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
}, },
"tasks": { "tasks": {
"build": [ "build": [
"add_build_number",
"compile_sdk" "compile_sdk"
] ]
} }
......
...@@ -204,6 +204,7 @@ ...@@ -204,6 +204,7 @@
}, },
"tasks": { "tasks": {
"build": [ "build": [
"add_build_number",
"compile_sdk" "compile_sdk"
] ]
} }
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
"../../web-apps/vendor/jszip-utils/jszip-utils.min.js", "../../web-apps/vendor/jszip-utils/jszip-utils.min.js",
"../../web-apps/vendor/jsrsasign/jsrsasign-latest-all-min.js" "../../web-apps/vendor/jsrsasign/jsrsasign-latest-all-min.js"
], ],
"map": "sdk-all.js.map", "ma,p": "sdk-all.js.map",
"log": "../word/Build/Log" "log": "../word/Build/Log"
}, },
"defines": { "defines": {
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
}, },
"tasks": { "tasks": {
"build": [ "build": [
"add_build_number",
"compile_sdk" "compile_sdk"
] ]
} }
......
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