Commit bebcbeba authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

Get the version and the build number from env vars.

parent 537ccf09
......@@ -68,18 +68,6 @@ module.exports = function(grunt) {
grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']);
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['GIT_COMMIT'];
grunt.file.write(defaultConfig, JSON.stringify(pkg, null, 4));
}
});
grunt.registerTask('compile_sdk_init', function(compilation_level) {
grunt.file.mkdir( packageFile['compile']['sdk']['log'] );
var map_file_path = packageFile['compile']['sdk']['dst'] + '.map';
......@@ -158,9 +146,8 @@ module.exports = function(grunt) {
version: {
options: {
variables: {
Version: packageFile['info']['version'],
Build: packageFile['info']['build'].toString(),
Rev: (packageFile['info']['rev'] || 1).toString()
Version: process.env['PRODUCT_VERSION'],
Build: process.env['BUILD_NUMBER']
}
},
files: {
......
{
"info": {
"version": "3.6.0",
"build": 163
},
"update_src": {
"revision": "HEAD",
"src": "../common ../word"
},
"compile": {
"sdk": {
"src": [
......@@ -184,7 +176,6 @@
},
"tasks": {
"build": [
"increment_build",
"compile_sdk_native"
]
}
......
{
"info": {
"version": "3.8.0",
"build": 148
},
"update_src": {
"revision": "HEAD",
"src": "../common ../word ../cell ../slide"
},
"compile": {
"sdk": {
"common": [
......@@ -199,7 +191,6 @@
},
"tasks": {
"build": [
"add_build_number",
"compile_sdk"
]
}
......
{
"info": {
"version": "3.8.0",
"build": 158
},
"update_src": {
"revision": "HEAD",
"src": "../common ../word ../slide"
},
"compile": {
"sdk": {
"common": [
......@@ -204,7 +196,6 @@
},
"tasks": {
"build": [
"add_build_number",
"compile_sdk"
]
}
......
{
"info": {
"version": "3.8.0",
"build": 167
},
"update_src": {
"revision": "HEAD",
"src": "../common ../word"
},
"compile": {
"sdk": {
"common": [
......@@ -187,7 +179,6 @@
},
"tasks": {
"build": [
"add_build_number",
"compile_sdk"
]
}
......
/**
* @license Copyright (c) Ascensio System SIA 2012-2015. All rights reserved
* @license Copyright (c) Ascensio System SIA 2012-2016. All rights reserved
*
* http://www.onlyoffice.com
*
* Version: @@Version (build:@@Build, rev:@@Rev)
* Version: @@Version (build:@@Build)
*/
\ No newline at end of file
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