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
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
ELECTRON: 'true'

- name: Package desktop app
run: npx electron-builder --${{ matrix.platform }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx electron-builder --${{ matrix.platform }} --publish never

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ files:
- dist-electron/**/*
extraResources:
- from: config.default.json
to: ../config.json
to: config.json
win:
icon: build/icon.ico
target:
Expand Down
10 changes: 5 additions & 5 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import fs from 'node:fs';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

// config.json lives next to the app:
// Config paths:
// dev → project root (process.cwd()), falls back to config.default.json
// prod → next to the executable (shipped from config.default.json)
const appDir = app.isPackaged ? path.dirname(process.execPath) : process.cwd();
const configPath = path.join(appDir, 'config.json');
const defaultConfigPath = path.join(appDir, 'config.default.json');
// prod → extraResources dir (Contents/Resources on macOS, resources/ on Linux/Windows)
const configDir = app.isPackaged ? process.resourcesPath : process.cwd();
const configPath = path.join(configDir, 'config.json');
const defaultConfigPath = path.join(configDir, 'config.default.json');

interface Config {
host: string;
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "rowbinary-explorer",
"private": true,
"version": "0.0.1",
"description": "Interactive hex viewer for ClickHouse RowBinary and Native wire formats",
"author": "alex-clickhouse <alex.soffronow@clickhouse.com>",
"type": "module",
"main": "dist-electron/main.js",
"scripts": {
Expand Down