aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-npm/scripts/npm-build.ts
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-01-24 10:31:04 -0800
committerGravatar Ashcon Partovi <ashcon@partovi.net> 2023-01-24 10:31:04 -0800
commit645b7271f9a170906b7ffff2fce49c823b2b9193 (patch)
tree3dcc106b05b3caaa1e19484e7ff2cebf4f573d6f /packages/bun-npm/scripts/npm-build.ts
parent77c72b3193f50ea2510e5a2d7e35a10b27274056 (diff)
downloadbun-645b7271f9a170906b7ffff2fce49c823b2b9193.tar.gz
bun-645b7271f9a170906b7ffff2fce49c823b2b9193.tar.zst
bun-645b7271f9a170906b7ffff2fce49c823b2b9193.zip
npm does not accept '+build' in releases :(
Diffstat (limited to 'packages/bun-npm/scripts/npm-build.ts')
-rw-r--r--packages/bun-npm/scripts/npm-build.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/bun-npm/scripts/npm-build.ts b/packages/bun-npm/scripts/npm-build.ts
index 874eedbf5..3218e28cc 100644
--- a/packages/bun-npm/scripts/npm-build.ts
+++ b/packages/bun-npm/scripts/npm-build.ts
@@ -32,8 +32,11 @@ async function build(version: string): Promise<void> {
if (release.tag_name === "canary") {
const { tag_name } = await getRelease();
const sha = await getSha(tag_name);
- // Note: this needs to be run using canary
- npmVersion = `${Bun.version}-canary+${sha}`;
+ // Bun.version is the nightly release version,
+ // but that means this script must be run using canary.
+ // Also, npm does not accept "+build" in releases,
+ // so the format is "{nightly}-canary.{sha}".
+ npmVersion = `${Bun.version}-canary.${sha}`;
} else {
npmVersion = release.tag_name.replace("bun-v", "");
}