[Title] // make version information file
authordev.sungmin.kim <dev.sungmin.kim@samsung.com>
Wed, 5 Sep 2012 11:48:45 +0000 (20:48 +0900)
committerdev.sungmin.kim <dev.sungmin.kim@samsung.com>
Wed, 5 Sep 2012 11:48:45 +0000 (20:48 +0900)
[Type]      //
[Module]    //
[Priority]  //
[CQ#]       //
[Redmine#]  // 6791
[Problem]   //
[Cause]     //
[Solution]  //
[TestCase]  //

12 files changed:
package/build.linux
package/build.macos
package/build.windows
package/pkginfo.manifest
src/build_server/BuildClientOptionParser.rb
src/build_server/BuildServerOptionParser.rb
src/builder/Builder.rb
src/builder/CleanOptionParser.rb
src/builder/optionparser.rb
src/common/utils.rb
src/pkg_server/clientOptParser.rb
src/pkg_server/serverOptParser.rb

index 9a4b9f60269fb76ed8ae1aa470a15995294c9ae9..ecb33b036deb7d326ef859ac3691ddb163ddb81d 100755 (executable)
@@ -23,10 +23,10 @@ install()
        cp -f $SRCDIR/pkg-* $BIN_DIR/
        cp -f $SRCDIR/build-* $BIN_DIR/
        cp -rf $SRCDIR/src $BIN_DIR/
-       cp -rf $SRCDIR/src $BIN_DIR/
        cp -f $SRCDIR/upgrade $BIN_DIR/
        cp -f $SRCDIR/AUTHORS $DOC_DIR/
        cp -f $SRCDIR/LICENSE $DOC_DIR/
        cp -f $SRCDIR/NOTICE $DOC_DIR/
        cp -f $SRCDIR/doc/* $DOC_DIR/
+       echo $VERSION > $BIN_DIR/VERSION
 }
index 39952273ab31fb54acb2a0d1a39c4837f9d37617..1f91da989da5840642c6f063d683728fe038543b 100755 (executable)
@@ -22,10 +22,10 @@ install()
        cp -f $SRCDIR/pkg-* $BIN_DIR/
        cp -f $SRCDIR/build-* $BIN_DIR/
        cp -rf $SRCDIR/src $BIN_DIR/
-       cp -rf $SRCDIR/src $BIN_DIR/
        cp -f $SRCDIR/upgrade $BIN_DIR/
        cp -f $SRCDIR/AUTHORS $DOC_DIR/
        cp -f $SRCDIR/LICENSE $DOC_DIR/
        cp -f $SRCDIR/NOTICE $DOC_DIR/
        cp -f $SRCDIR/doc/* $DOC_DIR/
+       echo $VERSION > $BIN_DIR/VERSION
 }
index 39952273ab31fb54acb2a0d1a39c4837f9d37617..1f91da989da5840642c6f063d683728fe038543b 100755 (executable)
@@ -22,10 +22,10 @@ install()
        cp -f $SRCDIR/pkg-* $BIN_DIR/
        cp -f $SRCDIR/build-* $BIN_DIR/
        cp -rf $SRCDIR/src $BIN_DIR/
-       cp -rf $SRCDIR/src $BIN_DIR/
        cp -f $SRCDIR/upgrade $BIN_DIR/
        cp -f $SRCDIR/AUTHORS $DOC_DIR/
        cp -f $SRCDIR/LICENSE $DOC_DIR/
        cp -f $SRCDIR/NOTICE $DOC_DIR/
        cp -f $SRCDIR/doc/* $DOC_DIR/
+       echo $VERSION > $BIN_DIR/VERSION
 }
index a40061844d8cc860113b6eeac37e19e678d7abaa..520e098cc9d6e17a90a57929f7b879cd017d14f5 100644 (file)
@@ -1,5 +1,5 @@
 Source : dibs
-Version :0.99.41
+Version :0.99.42
 Maintainer : taejun ha<taejun.ha@samsung.com>, jiil hyoun <jiil.hyoun@samsung.com>, donghyuk yang <donghyouk.yang@samsung.com>, donghee yang <donghee.yang@samsung.com>, sungmin kim <dev.sungmin.kim@samsung.com
 
 Package : dibs
index 0a80ea5bd93c353be03518bc3224004b70fa95f9..a01ce1eddaa07719807d17499568fd86dbd999ea 100644 (file)
@@ -170,7 +170,7 @@ def option_parse
         end
 
                opts.on( '-v', '--version', 'display version' ) do
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
                        exit
         end
                
index 4cd27fb8d81715ca80dfbe406cee9e404e4f4751..8eb2452f4307f4c1dcb9cdf5c57bb14e7ab65730 100644 (file)
@@ -194,7 +194,7 @@ def option_parse
         end
 
                opts.on( '-v', '--version', 'display version' ) do
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
                        exit
         end
 
index dc528d2f6541c09c94ec65fae53d7828386bbcb4..15e57023fea42df89f54ff0902e0e333c912e815 100644 (file)
@@ -249,12 +249,12 @@ class Builder
                end
 
                @log.info( "Make build...", Log::LV_USER)
-               if not execute_build_command("build", src_path, build_root_dir, os) then
+               if not execute_build_command("build", src_path, build_root_dir, os, pkginfo.get_version) then
                        return false
                end
                # execute install script
                @log.info( "Make install...", Log::LV_USER)
-               if not execute_build_command("install", src_path, build_root_dir, os) then
+               if not execute_build_command("install", src_path, build_root_dir, os, pkginfo.get_version) then
                        return false
                end
 
@@ -341,7 +341,7 @@ class Builder
 
 
        # execute build command
-       def execute_build_command( target, src_path, build_root_dir, os )
+       def execute_build_command( target, src_path, build_root_dir, os, version )
 
                # get category 
                os_category = Utils.get_os_category( os )
@@ -351,7 +351,8 @@ class Builder
                         TARGET_OS=#{os} \
                         TARGET_OS_CATEGORY=#{os_category} \
                         SRCDIR=\"#{src_path}\" \
-                        ROOTDIR=\"#{build_root_dir}\" "
+                        ROOTDIR=\"#{build_root_dir}\" \
+                        VERSION=\"#{version}\" "
 
                # check script file
                script_file = "#{src_path}/package/build.#{@host_os}"
@@ -667,6 +668,6 @@ class Builder
                end 
 
                # execute
-               return execute_build_command("clean", src_path, build_root_dir, target_os )
+               return execute_build_command("clean", src_path, build_root_dir, target_os, pkginfo.get_version)
        end
 end
index 61cec433e842c3fd1b1927317021c61d8f3cba48..48c838271f980135f7e4c80a489a03b46c408527 100644 (file)
@@ -28,6 +28,8 @@ Contributors:
 
 require 'optparse'
 require 'logger'
+$LOAD_PATH.unshift File.dirname(File.dirname(__FILE__))+"/common"
+require "utils"
 
 def parse()
 
@@ -44,7 +46,7 @@ def parse()
         end 
 
         opts.on('-v','--version', 'display version') do 
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
             exit
         end 
     end 
index 1ecf2c548dc2e68b00b8235ba7b2d351e818d41a..1d670554d66449807fe6ebc898d2f5b7a2138b7c 100644 (file)
@@ -28,6 +28,8 @@ Contributors:
 
 require 'optparse'
 require 'logger'
+$LOAD_PATH.unshift File.dirname(File.dirname(__FILE__))+"/common"
+require "utils"
 
 def parse()
 
@@ -63,7 +65,7 @@ def parse()
         end
 
         opts.on('-v','--version', 'display version') do 
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
             exit
         end 
     end
index 5972b762bc11bf508f905eaf9789415e67d8fb98..ea2bf959661ab6f9315f819f620d03d17affdfdc 100644 (file)
@@ -533,6 +533,20 @@ class Utils
                end
        end
 
+       def Utils.get_version()
+               version_file = "#{File.dirname(__FILE__)}/../../VERSION"
+
+               if not File.exist? version_file then
+                       return nil
+               end
+
+               f = File.open( version_file, "r" )
+               version = f.readline
+               f.close
+
+               return version
+       end
+
        if defined?(HOST_OS).nil? then
                HOST_OS = Utils.identify_current_OS()
        end
index 0e985c3c0a5ac3f80b90f063c00d610ff23c8388..29aca3f7b31b7154a1379b035c96b02b633b9af2 100644 (file)
@@ -169,7 +169,7 @@ def option_parse
         end
 
                opts.on( '-v', '--version', 'display version' ) do
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
                        exit
         end
     end
index 1483fccb1c8b960e2dc7c2220a46fa6308364426..029a803a7f1f978ef14b2d1ccbfe10c2c3c3a4c8 100644 (file)
@@ -222,7 +222,7 @@ def option_parse
         end
 
                opts.on( '-v', '--version', 'display version' ) do
-            puts "DIBS(Distributed Intelligent Build System) version 1.2.0"
+            puts "DIBS(Distributed Intelligent Build System) version " + Utils.get_version()
                        exit
         end
     end