Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 591ebd2

Browse files
committed
Add release script
1 parent acd98d3 commit 591ebd2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"lint": "eslint \"packages/*/{src,test}/**/*.ts\" \"scripts/**/*.{js,mjs}\" \"types/**/*.ts\"",
2727
"lint:fix": "npm run lint -- --fix",
2828
"prepublishOnly": "npm run lint && npm run clean && npm run build && npm run types:bundle && npm run test",
29+
"release": "./scripts/release.sh",
2930
"test": "npm run build && ava && rimraf ./.tmp",
3031
"types:build": "tsc && tsc -p packages/miniflare/src/workers/tsconfig.json",
3132
"types:bundle": "npm run types:build && node scripts/types.mjs"

scripts/release.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
MINOR="$1"
4+
5+
if [ -z "$MINOR" ]; then
6+
echo "Missing version argument"
7+
echo " Usage: ${0} <workerd-minor-version>"
8+
exit 1
9+
fi
10+
11+
MINIFLARE_VERSION="3.${MINOR}.0"
12+
WORKERD_VERSION="1.${MINOR}.0"
13+
14+
# checkout a new branch
15+
git fetch origin tre:tre
16+
git checkout -b "${USER}/v${MINIFLARE_VERSION}" tre
17+
18+
# update workerd
19+
npm install --workspace miniflare "workerd@${WORKERD_VERSION}"
20+
21+
# bump version and commit and tag release
22+
npm version "$MINIFLARE_VERSION" --force --include-workspace-root --workspace miniflare -m "Bump versions to %s"
23+
24+
# publish to npm
25+
npm run prepublishOnly
26+
npm publish -ws

0 commit comments

Comments
 (0)