Skip to content

Commit eee927d

Browse files
JohnMcLearclaude
andauthored
fix(release): stop merging master into develop so the version bump lands (#8398)
develop requires linear history, so the final "merge master into develop" step in bin/release.ts produced a merge commit that the push rejected. push-after-release.sh ignored the failure (no set -e), so master and the tags shipped while develop stayed on the previous version (3.3.10 after 3.3.11, 3.3.11 after 3.3.12). Drop the merge-back: develop keeps its "bump version" commit and is pushed as a fast-forward. Push all refs with --atomic under set -euo pipefail so a rejected ref fails the job instead of half-shipping. Also bump develop to 3.3.12 to match the release that just shipped. Claude-Session: https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dbb1a03 commit eee927d

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

‎admin/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "admin",
33
"private": true,
4-
"version": "3.3.11",
4+
"version": "3.3.12",
55
"type": "module",
66
"scripts": {
77
"dev": "pnpm gen:api && vite",

‎bin/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bin",
3-
"version": "3.3.11",
3+
"version": "3.3.12",
44
"description": "",
55
"main": "checkAllPads.js",
66
"directories": {

‎bin/push-after-release.sh‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
# Specify the path to your package.json file
45
PACKAGE_JSON_PATH="./src/package.json"
@@ -11,6 +12,7 @@ fi
1112

1213
# Read the version from package.json into a variable
1314
VERSION=$(jq -r '.version' "$PACKAGE_JSON_PATH")
14-
git push origin master develop $VERSION
15-
git push --tags
15+
# --atomic: if any ref is rejected (e.g. by branch protection), push none of
16+
# them and fail the job instead of shipping a tag with develop left behind.
17+
git push --atomic origin master develop "$VERSION" "v$VERSION"
1618
(cd ../ether.github.com && git push)

‎bin/release.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ try {
194194
console.log(`Creating ${newVersion} tag...`);
195195
run(`git tag -a '${newVersion}' -m '${newVersion}'`);
196196
run(`git tag -a 'v${newVersion}' -m 'v${newVersion}'`);
197+
// develop requires linear history, so it is not merged back from master: it
198+
// keeps the "bump version" commit made above and is pushed as a fast-forward.
197199
console.log('Switching back to develop...');
198200
run('git checkout develop');
199-
console.log('Merging master into develop...');
200-
run('git merge --no-ff --no-edit master');
201201
} catch (err:any) {
202202
console.error(err.toString());
203203
console.warn('Resetting repository...');

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
"url": "https://github.com/ether/etherpad.git"
5353
},
5454
"engineStrict": true,
55-
"version": "3.3.11",
55+
"version": "3.3.12",
5656
"license": "Apache-2.0"
5757
}

‎src/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@
161161
"debug:socketio": "cross-env DEBUG=socket.io* node --require tsx/cjs node/server.ts",
162162
"test:vitest": "vitest"
163163
},
164-
"version": "3.3.11",
164+
"version": "3.3.12",
165165
"license": "Apache-2.0"
166166
}

0 commit comments

Comments
 (0)