From f9b9472d93139c1edc72796b03e01c101d914a3c Mon Sep 17 00:00:00 2001 From: zemnmez Date: Thu, 16 Jun 2022 00:43:50 -0700 Subject: [PATCH 1/3] release fixes --- deploy/release.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/release.ts b/deploy/release.ts index 945cc9de96..5453a18fce 100644 --- a/deploy/release.ts +++ b/deploy/release.ts @@ -22,10 +22,13 @@ program .action(async (files, { body }) => { console.info('Publishing NPM packages...'); + const to_publish = [['svgshot', 'ts/cmd/svgshot/npm_pkg.publish.sh']]; const published: string[] = []; try { + if (!("NPM_TOKEN" in process.env)) + throw new Error("Missing NPM_TOKEN. We won't be able to publish any npm packages."); for (const [name, target] of to_publish) { child_process.execFileSync(target, { stdio: 'pipe', @@ -49,7 +52,7 @@ program tag_name: syntheticVersion, body: - body + + (await fs.readFile(body)).toString() + "\n" + `This release also includes the following published NPM packages:\n${published .map(name => ` - ${name}`) .join('\n')}`, From f1040d5ee01303aef136536f7d87905320d2e04f Mon Sep 17 00:00:00 2001 From: zemnmez Date: Thu, 16 Jun 2022 12:17:44 -0700 Subject: [PATCH 2/3] Revert "release fixes" This reverts commit f9b9472d93139c1edc72796b03e01c101d914a3c. --- deploy/release.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deploy/release.ts b/deploy/release.ts index 5453a18fce..945cc9de96 100644 --- a/deploy/release.ts +++ b/deploy/release.ts @@ -22,13 +22,10 @@ program .action(async (files, { body }) => { console.info('Publishing NPM packages...'); - const to_publish = [['svgshot', 'ts/cmd/svgshot/npm_pkg.publish.sh']]; const published: string[] = []; try { - if (!("NPM_TOKEN" in process.env)) - throw new Error("Missing NPM_TOKEN. We won't be able to publish any npm packages."); for (const [name, target] of to_publish) { child_process.execFileSync(target, { stdio: 'pipe', @@ -52,7 +49,7 @@ program tag_name: syntheticVersion, body: - (await fs.readFile(body)).toString() + "\n" + + body + `This release also includes the following published NPM packages:\n${published .map(name => ` - ${name}`) .join('\n')}`, From 8a224981f72e11fbcd57cae636ea416b175ac699 Mon Sep 17 00:00:00 2001 From: zemnmez Date: Thu, 16 Jun 2022 12:18:30 -0700 Subject: [PATCH 3/3] Fix previously broken commit This reverts commit f1040d5ee01303aef136536f7d87905320d2e04f. --- deploy/release.ts | 7 ++++++- js/npm/package_json/rules.bzl | 2 +- ts/cmd/svgshot/BUILD | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/deploy/release.ts b/deploy/release.ts index 945cc9de96..3aed116e0d 100644 --- a/deploy/release.ts +++ b/deploy/release.ts @@ -26,6 +26,10 @@ program const published: string[] = []; try { + if (!('NPM_TOKEN' in process.env)) + throw new Error( + "Missing NPM_TOKEN. We won't be able to publish any npm packages." + ); for (const [name, target] of to_publish) { child_process.execFileSync(target, { stdio: 'pipe', @@ -49,7 +53,8 @@ program tag_name: syntheticVersion, body: - body + + (await fs.readFile(body)).toString() + + '\n' + `This release also includes the following published NPM packages:\n${published .map(name => ` - ${name}`) .join('\n')}`, diff --git a/js/npm/package_json/rules.bzl b/js/npm/package_json/rules.bzl index 85c845c92e..1d96a0b9d5 100644 --- a/js/npm/package_json/rules.bzl +++ b/js/npm/package_json/rules.bzl @@ -51,4 +51,4 @@ def package_json(name, targets, template, version): ), outs = ["package.json"], tools = [genrule_name], - ) \ No newline at end of file + ) diff --git a/ts/cmd/svgshot/BUILD b/ts/cmd/svgshot/BUILD index 4502f6947c..014a8bc015 100644 --- a/ts/cmd/svgshot/BUILD +++ b/ts/cmd/svgshot/BUILD @@ -54,9 +54,9 @@ npm_pkg( major_version = "version/MAJOR", minor_version = "version/MINOR", patch_version = "version/PATCH", - version_lock = ".version.lock", pkg_json_base = "package.template.json", tgz = "svgshot.tgz", + version_lock = ".version.lock", visibility = ["//deploy:__subpackages__"], deps = [":project_ts"], )