소스 검색

[CI] error the build if we fail to push to haxe-output.

Andy Li 9 년 전
부모
커밋
c778ef7a01
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tests/RunCi.hx

+ 5 - 1
tests/RunCi.hx

@@ -672,9 +672,10 @@ class RunCi {
 		}
 
 		// try save() for 5 times because the push may fail when the another build push at the same time
+		var pushResult = null;
 		for (i in 0...5) {
 			save();
-			var pushResult = commandResult("git", ["push", "origin", haxe_output_branch]);
+			pushResult = commandResult("git", ["push", "origin", haxe_output_branch]);
 			if (pushResult.exitCode == 0) {
 				successMsg("push to haxe-output succeed");
 				break;
@@ -687,6 +688,9 @@ class RunCi {
 				Sys.sleep(Std.random(10));
 			}
 		}
+		if (pushResult.exitCode != 0) {
+			Sys.exit(1);
+		}
 	}
 
 	static function main():Void {