fix(desktop): make bundle and updater asset naming configurable (#7337)

Signed-off-by: Vadim Polulyakh <bavadim@gmail.com>
This commit is contained in:
Vadim
2026-02-26 22:36:44 +03:00
committed by GitHub
parent 4082285da4
commit 2f643091b7
4 changed files with 37 additions and 11 deletions
+26 -2
View File
@@ -46,7 +46,7 @@ goose's architecture is designed for extensibility. Organizations can create "re
|---------------|---------------|------------| |---------------|---------------|------------|
| Preconfigure a model/provider | `config.yaml`, `init-config.yaml`, environment variables | Low | | Preconfigure a model/provider | `config.yaml`, `init-config.yaml`, environment variables | Low |
| Add custom AI providers | `crates/goose/src/providers/declarative/` | Low | | Add custom AI providers | `crates/goose/src/providers/declarative/` | Low |
| Bundle custom MCP extensions | `config.yaml` extensions section, `ui/desktop/src/built-in-extensions.json` | Medium | | Bundle custom MCP extensions | `config.yaml` extensions section, `ui/desktop/src/built-in-extensions.json`, `ui/desktop/src/components/settings/extensions/bundled-extensions.json` | Medium |
| Modify system prompts | `crates/goose/src/prompts/` | Low | | Modify system prompts | `crates/goose/src/prompts/` | Low |
| Customize desktop branding | `ui/desktop/` (icons, names, colors) | Medium | | Customize desktop branding | `ui/desktop/` (icons, names, colors) | Medium |
| Build a new UI (web, mobile) | Integrate with `goose-server` REST API | High | | Build a new UI (web, mobile) | Integrate with `goose-server` REST API | High |
@@ -191,7 +191,11 @@ async def query_data_lake(query: str) -> str:
return results return results
``` ```
2. **Bundle as a built-in extension** by adding to `ui/desktop/src/built-in-extensions.json`: 2. **Bundle as a built-in extension** by adding to either:
- `ui/desktop/src/built-in-extensions.json` (core built-ins surfaced in extension UI)
- `ui/desktop/src/components/settings/extensions/bundled-extensions.json` (bundled extension catalog in Settings)
Example:
```json ```json
{ {
@@ -268,6 +272,26 @@ You are an AI assistant called [YourName], created by [YourCompany].
- Component text and labels - Component text and labels
- Feature visibility - Feature visibility
5. **Align packaging and updater names** when rebranding:
- Update static branding metadata in `ui/desktop/package.json` (`productName`, description) and Linux desktop templates (`ui/desktop/forge.deb.desktop`, `ui/desktop/forge.rpm.desktop`)
- Set build/release environment variables consistently:
- `GITHUB_OWNER` and `GITHUB_REPO` for publisher + updater repository lookup
- `GOOSE_BUNDLE_NAME` for bundle/debug scripts and updater asset naming (defaults to `Goose`)
Example:
```bash
export GITHUB_OWNER="your-org"
export GITHUB_REPO="your-goose-fork"
export GOOSE_BUNDLE_NAME="InsightStream-goose"
```
6. **Use this branding consistency checklist** before release:
- Application metadata (`forge.config.ts`, `package.json`, `index.html`) uses your distro name
- Release artifact names and updater lookup names are consistent
- Desktop launchers (Linux `.desktop` templates) point to the same executable name produced by packaging
### Technical Details ### Technical Details
- Electron config: `ui/desktop/forge.config.ts` - Electron config: `ui/desktop/forge.config.ts`
+4 -4
View File
@@ -17,10 +17,10 @@
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start", "start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
"package": "electron-forge package", "package": "electron-forge package",
"make": "electron-forge make", "make": "electron-forge make",
"bundle:default": "node scripts/prepare-platform-binaries.js && npm run make && (cd out/Goose-darwin-arm64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose.zip) || echo 'out/Goose-darwin-arm64 not found; either the binary is not built or you are not on macOS'", "bundle:default": "node scripts/prepare-platform-binaries.js && npm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true npm run make && (cd out/Goose-darwin-arm64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose_alpha.zip) || echo 'out/Goose-darwin-arm64 not found; either the binary is not built or you are not on macOS'", "bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true npm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:intel": "node scripts/prepare-platform-binaries.js && npm run make -- --arch=x64 && cd out/Goose-darwin-x64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose_intel_mac.zip", "bundle:intel": "node scripts/prepare-platform-binaries.js && npm run make -- --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
"debug": "echo 'run --remote-debugging-port=8315' && lldb out/Goose-darwin-arm64/Goose.app", "debug": "echo 'run --remote-debugging-port=8315' && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && lldb \"out/${BUNDLE_NAME}-darwin-arm64/${BUNDLE_NAME}.app\"",
"test-e2e": "npm run generate-api && playwright test", "test-e2e": "npm run generate-api && playwright test",
"test-e2e:dev": "npm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1", "test-e2e:dev": "npm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
"test-e2e:ui": "npm run generate-api && playwright test --ui", "test-e2e:ui": "npm run generate-api && playwright test --ui",
+6 -5
View File
@@ -29,6 +29,7 @@ interface UpdateCheckResult {
export class GitHubUpdater { export class GitHubUpdater {
private readonly owner = process.env.GITHUB_OWNER || 'block'; private readonly owner = process.env.GITHUB_OWNER || 'block';
private readonly repo = process.env.GITHUB_REPO || 'goose'; private readonly repo = process.env.GITHUB_REPO || 'goose';
private readonly bundleName = process.env.GOOSE_BUNDLE_NAME || 'Goose';
private readonly apiUrl = `https://api.github.com/repos/${this.owner}/${this.repo}/releases/latest`; private readonly apiUrl = `https://api.github.com/repos/${this.owner}/${this.repo}/releases/latest`;
async checkForUpdates(): Promise<UpdateCheckResult> { async checkForUpdates(): Promise<UpdateCheckResult> {
@@ -103,16 +104,16 @@ export class GitHubUpdater {
if (platform === 'darwin') { if (platform === 'darwin') {
// macOS // macOS
if (arch === 'arm64') { if (arch === 'arm64') {
assetName = 'Goose.zip'; assetName = `${this.bundleName}.zip`;
} else { } else {
assetName = 'Goose_intel_mac.zip'; assetName = `${this.bundleName}_intel_mac.zip`;
} }
} else if (platform === 'win32') { } else if (platform === 'win32') {
// Windows - for future support // Windows - for future support
assetName = 'Goose-win32-x64.zip'; assetName = `${this.bundleName}-win32-x64.zip`;
} else { } else {
// Linux - for future support // Linux - for future support
assetName = `Goose-linux-${arch}.zip`; assetName = `${this.bundleName}-linux-${arch}.zip`;
} }
log.info(`GitHubUpdater: Looking for asset named: ${assetName}`); log.info(`GitHubUpdater: Looking for asset named: ${assetName}`);
@@ -254,7 +255,7 @@ export class GitHubUpdater {
// Save to Downloads directory // Save to Downloads directory
const downloadsDir = path.join(os.homedir(), 'Downloads'); const downloadsDir = path.join(os.homedir(), 'Downloads');
const fileName = `goose-${latestVersion}.zip`; const fileName = `${this.bundleName}-${latestVersion}.zip`;
const downloadPath = path.join(downloadsDir, fileName); const downloadPath = path.join(downloadsDir, fileName);
log.info(`GitHubUpdater: Writing file to ${downloadPath}...`); log.info(`GitHubUpdater: Writing file to ${downloadPath}...`);
+1
View File
@@ -5,5 +5,6 @@ export default defineConfig({
define: { define: {
'process.env.GITHUB_OWNER': JSON.stringify(process.env.GITHUB_OWNER || 'block'), 'process.env.GITHUB_OWNER': JSON.stringify(process.env.GITHUB_OWNER || 'block'),
'process.env.GITHUB_REPO': JSON.stringify(process.env.GITHUB_REPO || 'goose'), 'process.env.GITHUB_REPO': JSON.stringify(process.env.GITHUB_REPO || 'goose'),
'process.env.GOOSE_BUNDLE_NAME': JSON.stringify(process.env.GOOSE_BUNDLE_NAME || 'Goose'),
}, },
}); });