Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Closed
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 apps/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pnpm make

Output will be in:

- `out/mac-arm64/PostHog.app` - Packaged app
- `out/mac-arm64/PostHog Code.app` - Packaged app
- `out/PostHog-Code-*.dmg` - macOS installer
- `out/make/zip/` - ZIP archives

Expand Down
7 changes: 5 additions & 2 deletions apps/code/electron-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ const skipNotarize =
const config: Configuration = {
// Original release bundle id; changing it breaks existing installs' data dir and Keychain entries.
appId: "com.posthog.array",
productName: "PostHog",
executableName: "PostHog",
// Frozen like appId: Squirrel names the installed bundle after the update
// payload and relaunches the pre-update path, so renaming these strands
// every existing install (no relaunch, dead Dock pins) — see v0.58.0.
productName: "PostHog Code",
executableName: "PostHog Code",

directories: {
output: "out",
Expand Down
2 changes: 1 addition & 1 deletion apps/code/scripts/dev-update/build-pair.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pnpm exec electron-builder build --mac zip --arm64 --publish never \
-c.extraMetadata.version="$OLD_VERSION" --config electron-builder.ts

echo "==> feed=$FEED_DIR"
echo "==> app=out/mac-arm64/PostHog.app ($OLD_VERSION)"
echo "==> app=out/mac-arm64/PostHog Code.app ($OLD_VERSION)"
4 changes: 2 additions & 2 deletions apps/code/scripts/dev-update/run-from-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ FEED_YML="$(find "$TMP/new" -name latest-mac.yml | head -1)"
echo "==> old 1.0.0 app -> out/mac-arm64"
rm -rf out/mac-arm64 && mkdir -p out/mac-arm64
ditto -x -k "$OLD_ZIP" out/mac-arm64
xattr -dr com.apple.quarantine "out/mac-arm64/PostHog.app" 2>/dev/null || true
xattr -dr com.apple.quarantine "out/mac-arm64/PostHog Code.app" 2>/dev/null || true

echo "==> new 2.0.0 feed -> out/dev-update-feed"
rm -rf out/dev-update-feed && mkdir -p out/dev-update-feed
Expand All @@ -81,6 +81,6 @@ echo " It swaps and relaunches into 2.0.0. Quit the app (or Ctrl+C) to finish
echo " App output: $APP_LOG update log: ~/.posthog-code/logs/main.log"
echo
POSTHOG_E2E_UPDATE_FEED="http://127.0.0.1:$PORT" \
"out/mac-arm64/PostHog.app/Contents/MacOS/PostHog" >"$APP_LOG" 2>&1 || true
"out/mac-arm64/PostHog Code.app/Contents/MacOS/PostHog Code" >"$APP_LOG" 2>&1 || true

echo "==> app exited; cleaning up"
4 changes: 2 additions & 2 deletions apps/code/tests/e2e/fixtures/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function getAppPath(): string {
if (process.platform === "darwin") {
const arm64Path = path.join(
outDir,
"mac-arm64/PostHog.app/Contents/MacOS/PostHog",
"mac-arm64/PostHog Code.app/Contents/MacOS/PostHog Code",
);
const x64Path = path.join(outDir, "mac/PostHog.app/Contents/MacOS/PostHog");
const x64Path = path.join(outDir, "mac/PostHog Code.app/Contents/MacOS/PostHog Code");

if (requestedArch === "arm64") {
if (existsSync(arm64Path)) return arm64Path;
Expand Down
6 changes: 3 additions & 3 deletions apps/code/tests/e2e/fixtures/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import path from "node:path";

const OUT_DIR = path.join(__dirname, "../../../out");

export const PRISTINE_APP = path.join(OUT_DIR, "mac-arm64/PostHog.app");
export const PRISTINE_APP = path.join(OUT_DIR, "mac-arm64/PostHog Code.app");
export const FEED_DIR = path.join(OUT_DIR, "dev-update-feed");
export const RUN_DIR = path.join(OUT_DIR, "e2e-update-run");
export const RUN_APP = path.join(RUN_DIR, "PostHog.app");
export const RUN_APP_BIN = path.join(RUN_APP, "Contents/MacOS/PostHog");
export const RUN_APP = path.join(RUN_DIR, "PostHog Code.app");
export const RUN_APP_BIN = path.join(RUN_APP, "Contents/MacOS/PostHog Code");

// The "old" side of the Forge -> electron-builder test: a real Electron Forge
// build (v0.55.132) produced by scripts/dev-update/build-old-forge.sh. It runs
Expand Down
Loading