@@ -13,7 +13,7 @@ const $$ = $({ cwd: root });
13
13
*
14
14
* @param {string } taskSourceDirname
15
15
*/
16
- async function buildAndPublish ( taskSourceDirname ) {
16
+ async function build ( taskSourceDirname ) {
17
17
const taskDir = join ( root , taskSourceDirname ) ;
18
18
await $$ `pnpm -C ${ taskDir } build` ;
19
19
@@ -34,17 +34,19 @@ async function buildAndPublish (taskSourceDirname) {
34
34
) } ${ out } `;
35
35
36
36
await $$ `npm -C ${ out } install --production --package-lock=false` ;
37
-
38
- const args = process . argv . slice ( 2 ) ;
39
- const publish = args [ 0 ] === "--publish" ;
40
-
41
- const pat = process . env . AZURE_TOKEN ;
42
-
43
- await $$ `tfx extension ${
44
- publish ? [ "publish" , "--token" , pat , "--no-wait-validation" ] : "create"
45
- } --manifest-globs vss-extension.json`;
46
-
47
- await rm ( out , { recursive : true , force : true } ) ;
37
+
38
+ return out ;
48
39
}
49
40
50
- await Promise . all ( sources . map ( source => buildAndPublish ( source ) ) ) ;
41
+ const outputs = await Promise . all ( sources . map ( source => build ( source ) ) ) ;
42
+
43
+ const args = process . argv . slice ( 2 ) ;
44
+ const publish = args [ 0 ] === "--publish" ;
45
+
46
+ const pat = process . env . AZURE_TOKEN ;
47
+
48
+ await $$ `tfx extension ${
49
+ publish ? [ "publish" , "--token" , pat , "--no-wait-validation" ] : "create"
50
+ } --manifest-globs vss-extension.json`;
51
+
52
+ await Promise . all ( outputs . map ( output => rm ( output , { recursive : true , force : true } ) ) )
0 commit comments