Debian Codegraph @

build/release-test.js

raw symbols SCIP
1 "use strict";
2
3 var shell = require( "shelljs" );
4 var Release = {
5 define: function( props ) {
6 for ( var key in props ) {
7 Release[ key ] = props[ key ];
8 }
9 },
10 exec: function( _options, errorMessage ) {
11 var result,
12 command = _options.command || _options,
13 options = {};
14
15 if ( _options.silent ) {
16 options.silent = true;
17 }
18
19 errorMessage = errorMessage || "Error executing command: " + command;
20
21 result = shell.exec( command, options );
22 if ( result.code !== 0 ) {
23 Release.abort( errorMessage );
24 }
25
26 return result.output;
27 },
28 abort: function() {
29 console.error.apply( console, arguments );
30 process.exit( 1 );
31 },
32 newVersion: require( "../package" ).version
33 };
34
35 var script = require( "./release" );
36 script( Release );
37
38 // Ignores actual version installed, should be good enough for a test
39 if ( shell.exec( "npm ls --depth 0 | grep download.jqueryui.com" ).code === 1 ) {
40 shell.exec( "npm install --no-save " + script.dependencies.join( " " ) );
41 }
42
43 // If AUTHORS.txt is outdated, this will update it
44 // Very annoying during an actual release
45 shell.exec( "grunt update-authors" );
46
47 Release.generateArtifacts( function() {
48 console.log( "Done generating artifacts, verify output, should be in dist/cdn" );
49 } );