Skip to content

Commit bf23fb3

Browse files
author
Ethan Arrowood
committed
fix build and publish script. v0.0.6
1 parent 7bae17d commit bf23fb3

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

scripts/build-and-publish.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const $$ = $({ cwd: root });
1313
*
1414
* @param {string} taskSourceDirname
1515
*/
16-
async function buildAndPublish (taskSourceDirname) {
16+
async function build (taskSourceDirname) {
1717
const taskDir = join(root, taskSourceDirname);
1818
await $$`pnpm -C ${taskDir} build`;
1919

@@ -34,17 +34,19 @@ async function buildAndPublish (taskSourceDirname) {
3434
)} ${out}`;
3535

3636
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;
4839
}
4940

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 })))

vss-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"manifestVersion": 1,
44
"id": "vercel-deployment-extension",
55
"name": "Vercel Deployment Extension",
6-
"version": "0.0.5",
6+
"version": "0.0.6",
77
"publisher": "Vercel",
88
"targets": [
99
{

0 commit comments

Comments
 (0)