[Title] Modified to continue build process when "git reset fail"
authordonghee yang <donghee.yang@samsung.com>
Fri, 5 Apr 2013 01:18:25 +0000 (10:18 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Fri, 5 Apr 2013 01:18:25 +0000 (10:18 +0900)
src/build_server/GitBuildJob.rb

index db1a18495e3dc18f0856892673d9174661677931..b68d60bc62873d343fb534d8526258b4f8bf4a4f 100644 (file)
@@ -282,8 +282,9 @@ class GitBuildJob < BuildJob
                else
                        # git reset
                        if not git_cmd("reset --hard #{@git_commit}", git_path, @log) then
-                               @log.error( "Failed on \"git reset --hard #{@git_commit}\"", Log::LV_USER)
-                               return nil
+                               @log.warn( "Failed on \"git reset --hard #{@git_commit}\"", Log::LV_USER)
+                               FileUtils.rm_rf git_path
+                               @git_commit = get_source_code_internal()
                        end
                end