@@ -5,6 +5,7 @@ var os = require("os");
55var path = require ( "path" ) ;
66var child_process = require ( "child_process" ) ;
77var Linter = require ( "tslint" ) ;
8+ var fold = require ( "travis-fold" ) ;
89var runTestsInParallel = require ( "./scripts/mocha-parallel" ) . runTestsInParallel ;
910
1011// Variables
@@ -560,9 +561,19 @@ compileFile(
560561desc ( "Builds language service server library" ) ;
561562task ( "lssl" , [ tsserverLibraryFile , tsserverLibraryDefinitionFile ] ) ;
562563
564+ desc ( "Emit the start of the build fold" ) ;
565+ task ( "build-fold-start" , [ ] , function ( ) {
566+ if ( fold . isTravis ( ) ) console . log ( fold . start ( "build" ) ) ;
567+ } ) ;
568+
569+ desc ( "Emit the end of the build fold" ) ;
570+ task ( "build-fold-end" , [ ] , function ( ) {
571+ if ( fold . isTravis ( ) ) console . log ( fold . end ( "build" ) ) ;
572+ } ) ;
573+
563574// Local target to build the compiler and services
564575desc ( "Builds the full compiler and services" ) ;
565- task ( "local" , [ "generate-diagnostics" , "lib" , tscFile , servicesFile , nodeDefinitionsFile , serverFile , builtGeneratedDiagnosticMessagesJSON , "lssl" ] ) ;
576+ task ( "local" , [ "build-fold-start" , " generate-diagnostics", "lib" , tscFile , servicesFile , nodeDefinitionsFile , serverFile , builtGeneratedDiagnosticMessagesJSON , "lssl" , "build-fold-end "] ) ;
566577
567578// Local target to build only tsc.js
568579desc ( "Builds only the compiler" ) ;
@@ -998,12 +1009,22 @@ var tslintRulesOutFiles = tslintRules.map(function(p) {
9981009 return path . join ( builtLocalDirectory , "tslint" , p + ".js" ) ;
9991010} ) ;
10001011desc ( "Compiles tslint rules to js" ) ;
1001- task ( "build-rules" , tslintRulesOutFiles ) ;
1012+ task ( "build-rules" , [ "build-rules-start" ] . concat ( tslintRulesOutFiles ) . concat ( [ "build-rules-end" ] ) ) ;
10021013tslintRulesFiles . forEach ( function ( ruleFile , i ) {
10031014 compileFile ( tslintRulesOutFiles [ i ] , [ ruleFile ] , [ ruleFile ] , [ ] , /*useBuiltCompiler*/ false ,
10041015 { noOutFile : true , generateDeclarations : false , outDir : path . join ( builtLocalDirectory , "tslint" ) } ) ;
10051016} ) ;
10061017
1018+ desc ( "Emit the start of the build-rules fold" ) ;
1019+ task ( "build-rules-start" , [ ] , function ( ) {
1020+ if ( fold . isTravis ( ) ) console . log ( fold . start ( "build-rules" ) ) ;
1021+ } ) ;
1022+
1023+ desc ( "Emit the end of the build-rules fold" ) ;
1024+ task ( "build-rules-end" , [ ] , function ( ) {
1025+ if ( fold . isTravis ( ) ) console . log ( fold . end ( "build-rules" ) ) ;
1026+ } ) ;
1027+
10071028function getLinterOptions ( ) {
10081029 return {
10091030 configuration : require ( "./tslint.json" ) ,
@@ -1047,6 +1068,7 @@ var lintTargets = compilerSources
10471068
10481069desc ( "Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex" ) ;
10491070task ( "lint" , [ "build-rules" ] , function ( ) {
1071+ if ( fold . isTravis ( ) ) console . log ( fold . start ( "lint" ) ) ;
10501072 var lintOptions = getLinterOptions ( ) ;
10511073 var failed = 0 ;
10521074 var fileMatcher = RegExp ( process . env . f || process . env . file || process . env . files || "" ) ;
@@ -1062,6 +1084,7 @@ task("lint", ["build-rules"], function() {
10621084 done [ target ] = true ;
10631085 }
10641086 }
1087+ if ( fold . isTravis ( ) ) console . log ( fold . end ( "lint" ) ) ;
10651088 if ( failed > 0 ) {
10661089 fail ( 'Linter errors.' , failed ) ;
10671090 }
0 commit comments