@@ -311,7 +311,7 @@ var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnostic
311
311
var diagnosticMessagesJson = path . join ( compilerDirectory , "diagnosticMessages.json" ) ;
312
312
var diagnosticInfoMapTs = path . join ( compilerDirectory , "diagnosticInformationMap.generated.ts" ) ;
313
313
314
- file ( processDiagnosticMessagesTs )
314
+ file ( processDiagnosticMessagesTs ) ;
315
315
316
316
// processDiagnosticMessages script
317
317
compileFile ( processDiagnosticMessagesJs ,
@@ -342,6 +342,65 @@ desc("Generates a diagnostic file in TypeScript based on an input JSON file");
342
342
task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] )
343
343
344
344
345
+ // Publish nightly
346
+ var configureNightlyJs = path . join ( scriptsDirectory , "configureNightly.js" ) ;
347
+ var configureNightlyTs = path . join ( scriptsDirectory , "configureNightly.ts" ) ;
348
+ var packageJson = "package.json" ;
349
+ var programTs = path . join ( compilerDirectory , "program.ts" )
350
+
351
+ file ( configureNightlyTs ) ;
352
+
353
+ compileFile ( /*outfile*/ configureNightlyJs ,
354
+ /*sources*/ [ configureNightlyTs ] ,
355
+ /*prereqs*/ [ configureNightlyTs ] ,
356
+ /*prefixes*/ [ ] ,
357
+ /*useBuiltCompiler*/ false ,
358
+ /*noOutFile*/ false ,
359
+ /*generateDeclarations*/ false ,
360
+ /*outDir*/ undefined ,
361
+ /*preserveConstEnums*/ undefined ,
362
+ /*keepComments*/ false ,
363
+ /*noResolve*/ false ,
364
+ /*stripInternal*/ false ,
365
+ /*callback*/ function ( ) {
366
+ var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs ;
367
+ console . log ( cmd ) ;
368
+ var ex = jake . createExec ( [ cmd ] ) ;
369
+ // Add listeners for output and error
370
+ ex . addListener ( "stdout" , function ( output ) {
371
+ process . stdout . write ( output ) ;
372
+ } ) ;
373
+ ex . addListener ( "stderr" , function ( error ) {
374
+ process . stderr . write ( error ) ;
375
+ } ) ;
376
+ ex . addListener ( "cmdEnd" , function ( ) {
377
+ complete ( ) ;
378
+ } ) ;
379
+ ex . run ( ) ;
380
+ } ) ;
381
+
382
+ task ( "setDebugModeTrue" , function ( ) {
383
+ useDebugMode = true ;
384
+ } ) ;
385
+
386
+ desc ( "Configure, build, test, and publish the nightly release." ) ;
387
+ task ( "publish-nightly" , [ configureNightlyJs , "LKG" , "clean" , "setDebugModeTrue" , "runtests" ] , function ( ) {
388
+ var cmd = "npm publish" ;
389
+ console . log ( cmd ) ;
390
+ var ex = jake . createExec ( [ cmd ] ) ;
391
+ // Add listeners for output and error
392
+ ex . addListener ( "stdout" , function ( output ) {
393
+ process . stdout . write ( output ) ;
394
+ } ) ;
395
+ ex . addListener ( "stderr" , function ( error ) {
396
+ process . stderr . write ( error ) ;
397
+ } ) ;
398
+ ex . addListener ( "cmdEnd" , function ( ) {
399
+ complete ( ) ;
400
+ } ) ;
401
+ ex . run ( ) ;
402
+ } , { async : true } ) ;
403
+
345
404
// Local target to build the compiler and services
346
405
var tscFile = path . join ( builtLocalDirectory , compilerFilename ) ;
347
406
compileFile ( tscFile , compilerSources , [ builtLocalDirectory , copyright ] . concat ( compilerSources ) , [ copyright ] , /*useBuiltCompiler:*/ false ) ;
0 commit comments