Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The merge is the person's. Wait to be told it is merged, unless the person asks

**The bump pull request is an ordinary pull request.** Fill in `.github/pull_request_template.md` and run the review AGENTS.md requires before opening it.

**The person downloads the artifacts; this skill checks them.** This skill cannot see Buildkite: the build reports nothing to the pull request. Ask the person to confirm that the build's commit matches the pull request's current head, and to download the three files from it into a directory they name. Then run the checks in section 2 of `RELEASING.md`, *Check the signed artifacts*, and report each result. Do not report the build as matching the head until the person has said it does.
**The person downloads the artifacts; this skill checks them.** This skill cannot see Buildkite: the build reports nothing to the pull request. Ask the person to confirm that the build's commit matches the pull request's current head, and to download the five files from it into a directory they name. Then run the checks in section 2 of `RELEASING.md`, *Check the signed artifacts*, and report each result. Do not report the build as matching the head until the person has said it does.

**Draft the release notes once the pull request is merged.** Write them plainly, save them to a temporary directory outside the repository, and show them in the chat for editing before `gh release create` (item 4 above).

Expand Down
8 changes: 7 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,20 @@ steps:
echo "~~~ Install Node dependencies"
npm ci --no-audit --no-progress --maxsockets 1

echo "~~~ Build Linux artifact"
echo "~~~ Install rpmbuild for the rpm target"
apt-get update -qq
apt-get install -y -qq --no-install-recommends rpm

echo "~~~ Build Linux artifacts"
npm run dist
plugins:
- $DOCKER_PLUGIN:
image: "$NODE_DOCKER_IMAGE"
always-pull: true
artifact_paths:
- dist/*.AppImage
- dist/*.deb
- dist/*.rpm
notify:
- github_commit_status: { context: "Linux Build" }

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The merge is the person's. Wait to be told it is merged, unless the person asks

**The bump pull request is an ordinary pull request.** Fill in `.github/pull_request_template.md` and run the review AGENTS.md requires before opening it.

**The person downloads the artifacts; this skill checks them.** This skill cannot see Buildkite: the build reports nothing to the pull request. Ask the person to confirm that the build's commit matches the pull request's current head, and to download the three files from it into a directory they name. Then run the checks in section 2 of `RELEASING.md`, *Check the signed artifacts*, and report each result. Do not report the build as matching the head until the person has said it does.
**The person downloads the artifacts; this skill checks them.** This skill cannot see Buildkite: the build reports nothing to the pull request. Ask the person to confirm that the build's commit matches the pull request's current head, and to download the five files from it into a directory they name. Then run the checks in section 2 of `RELEASING.md`, *Check the signed artifacts*, and report each result. Do not report the build as matching the head until the person has said it does.

**Draft the release notes once the pull request is merged.** Write them plainly, save them to a temporary directory outside the repository, and show them in the chat for editing before `gh release create` (item 4 above).

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ npm run dist:win:arm64

The renderer is bundled by esbuild into `src/renderer/index.js` and `index.css`. Those are generated files, are not committed, and are rebuilt by `npm install`, `npm start` and every `npm run dist` — so there is no bundling step to remember after changing `src/renderer/index.jsx` or the components and hooks it imports from `src/renderer/components/` and `src/renderer/hooks/`. `npm run build:once` still exists if you want to rebuild on its own.

Output goes to `dist/`. On Linux, `npm run dist` creates an AppImage. macOS packages use the build machine's architecture, and the published macOS builds currently target Apple Silicon (`arm64`) only.
Output goes to `dist/`. On Linux, `npm run dist` creates an AppImage, a `.deb` and an `.rpm`; building the `.rpm` needs `rpmbuild` (the `rpm` package on Debian and Ubuntu). macOS packages use the build machine's architecture, and the published macOS builds currently target Apple Silicon (`arm64`) only.

### App icon

Expand Down
10 changes: 6 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Versions are `X.Y.Z` for a stable release and `X.Y.Z-beta.N` for a beta. Tags ad

## 2. Check the signed artifacts

Buildkite builds signed Windows, macOS and Linux artifacts for the pull request's branch. Before merging, open the build for the pull request's **current head commit** (`gh pr view <number> --json headRefOid --jq .headRefOid`), download the three files into one directory, and check them. Buildkite reports nothing back to the pull request (`.buildkite/pipeline.yml` asks for a commit status per platform, but none reached the 2.0.0 bump pull request), so the commit can only be read on the build's page in Buildkite: compare it with `headRefOid` there, by eye.
Buildkite builds signed Windows, macOS and Linux artifacts for the pull request's branch. Before merging, open the build for the pull request's **current head commit** (`gh pr view <number> --json headRefOid --jq .headRefOid`), download the five files into one directory, and check them. Buildkite reports nothing back to the pull request (`.buildkite/pipeline.yml` asks for a commit status per platform, but none reached the 2.0.0 bump pull request), so the commit can only be read on the build's page in Buildkite: compare it with `headRefOid` there, by eye.

- The files are named `wordpress-contributor-toolkit-X.Y.Z-win-x64.exe`, `wordpress-contributor-toolkit-X.Y.Z-mac-arm64.dmg` and `wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.AppImage`. The Windows file may download as `dist_wordpress-contributor-toolkit-X.Y.Z-win-x64.exe`, because the Windows build uploads it from `dist\`. Rename it to remove the `dist_` prefix, so its name matches the other two.
- The files are named `wordpress-contributor-toolkit-X.Y.Z-win-x64.exe`, `wordpress-contributor-toolkit-X.Y.Z-mac-arm64.dmg`, `wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.AppImage`, `wordpress-contributor-toolkit-X.Y.Z-linux-amd64.deb` and `wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.rpm`. The Windows file may download as `dist_wordpress-contributor-toolkit-X.Y.Z-win-x64.exe`, because the Windows build uploads it from `dist\`. Rename it to remove the `dist_` prefix, so its name matches the others.
- The macOS app is signed with Automattic's Developer ID, notarized, and has its ticket stapled.
- The Windows installer carries an Authenticode signature from Automattic Inc.
- The app's `app.asar` root holds exactly `node_modules`, `package.json` and `src`, with npm 11 under `node_modules/npm` and no `.codesigning` directory.
Expand Down Expand Up @@ -118,7 +118,9 @@ gh release create vX.Y.Z \
--notes-file "<path>/notes.md" \
"<dir>/wordpress-contributor-toolkit-X.Y.Z-win-x64.exe" \
"<dir>/wordpress-contributor-toolkit-X.Y.Z-mac-arm64.dmg" \
"<dir>/wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.AppImage"
"<dir>/wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.AppImage" \
"<dir>/wordpress-contributor-toolkit-X.Y.Z-linux-amd64.deb" \
"<dir>/wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.rpm"
```

- **A beta** adds `--prerelease`, so `releases/latest` stays on the last stable release.
Expand Down Expand Up @@ -161,7 +163,7 @@ The first two list the issues and pull requests still open, the third finds the

## 7. Check the result

- `gh release view vX.Y.Z` lists the three files under the names from step 2, and shows the release as a pre-release only for a beta.
- `gh release view vX.Y.Z` lists the five files under the names from step 2, and shows the release as a pre-release only for a beta.
- `gh api repos/WordPress/contributor-toolkit/releases/latest --jq .tag_name` prints `vX.Y.Z` for a stable release, and the previous stable tag for a beta.
- `git ls-remote origin refs/tags/vX.Y.Z` points at the bump commit.
- For a stable release, the docs run from step 5 finished with its deploy job.
Expand Down
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "GPL-2.0-or-later",
"description": "Desktop app that sets up a WordPress core development environment with no prerequisites, applies the work already on a Trac ticket, and submits a contribution back",
"homepage": "https://wordpress.github.io/contributor-toolkit/",
"desktopName": "wordpress-contributor-toolkit.desktop",
"repository": {
"type": "git",
"url": "git+https://github.com/WordPress/contributor-toolkit.git"
Expand Down Expand Up @@ -99,10 +100,20 @@
"icon": "build/icon.png",
"linux": {
"maintainer": "WordPress.org",
"category": "Development",
"executableName": "wordpress-contributor-toolkit",
"target": [
"AppImage"
"AppImage",
"deb",
"rpm"
]
},
"deb": {
"packageName": "wordpress-contributor-toolkit"
},
"rpm": {
"packageName": "wordpress-contributor-toolkit"
},
"win": {
"icon": "build/icon.ico",
"signtoolOptions": {
Expand Down
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,9 @@ function relaunchArgs(argv) {
return argv.slice(1).filter((arg) => !pickDeepLinkArg([arg]) && !arg.startsWith('--lang='));
}

// On Linux the app is an AppImage, mounted while it runs at the path the
// process was started from and gone once it quits: the new instance is
// started from the image itself.
// An AppImage is mounted while it runs at the path the process was started
// from and gone once it quits, so the new instance is started from the image
// itself. A deb or rpm install has no APPIMAGE and relaunches in place.
ipcMain.handle('app:relaunch', () => {
app.relaunch({
args: relaunchArgs(process.argv),
Expand Down
16 changes: 16 additions & 0 deletions tests/unit/linux-desktop-name.test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Guards the Linux desktop identity of the packaged app.
//
// Electron names the running app after desktopName in package.json: it is the Wayland app_id, the
// X11 WM_CLASS and what setAsDefaultProtocolClient('wpct') hands to xdg-settings. electron-builder
// names the installed .desktop file after build.linux.executableName. The two have to agree, or the
// desktop cannot tie the open window to its menu entry and the wpct:// registration names a file
// that does not exist (#782).

const test = require('node:test');
const assert = require('node:assert/strict');

const pkg = require('../../package.json');

test('desktopName names the .desktop file the Linux packages install', () => {
assert.equal(pkg.desktopName, `${pkg.build.linux.executableName}.desktop`);
});
Loading