Files
goldenChart/docs/desktop-pilot.md
T
2026-06-14 10:41:05 +09:00

3.4 KiB

GoldenChart Desktop — 내부 파일럿 배포·운영 가이드 (10명 이내)

1. 서버 최초 설정 (macOS Jenkins, 1회)

cd /Users/aidev/apps/goldenChart   # WORK_TREE

# Rust · NSIS · cargo-xwin
./scripts/install-desktop-build-deps.sh

# updater 서명 키 (private → ~/.tauri/, public → desktop/updater.pub)
./scripts/setup-desktop-updater-keys.sh
git add desktop/updater.pub desktop/src-tauri/tauri.conf.json
git commit -m "chore(desktop): add updater public key"

# Jenkins Job 등록
./scripts/server-install-desktop-jenkins.sh

Jenkins Credential (Secret file): tauri-signer-key/Users/aidev/.tauri/goldenchart.key

Global PATH에 추가:

/opt/homebrew/opt/llvm/bin
/opt/homebrew/bin
$HOME/.cargo/bin

2. Jenkins Job: goldenChart-Desktop-Pipeline

항목
SCM file:///Volumes/ADATA/git/goldenChart.git main
트리거 git push main 성공 시 post-receive → 자동 Jenkins 빌드
빌드 scripts/jenkins-desktop-pipeline.sh
Artifact dist-desktop/**

main push 흐름:

git push exdev main
  → post-receive → deploy.sh (웹·백엔드 Docker)
  → trigger-desktop-jenkins-build.sh (Jenkins 큐)
  → macOS dmg + Windows exe + updater 번들
  → publish-desktop-update.sh → latest.json
  → nginx reload (frontend 볼륨 마운트)
  → Desktop 앱 「업데이트」 버튼으로 자동 업데이트

CI 빌드 시 latest.json 버전 기준 patch 자동 bump (예: 0.1.3 → 0.1.4).

환경 변수 (선택):

변수 설명
TAURI_SIGNER_KEY private key 경로
DESKTOP_DEPLOY_WEB=1 빌드 후 frontend Docker 재배포
BUMP_VERSION=patch 빌드 시 버전 bump
DESKTOP_UPDATE_BASE_URL latest.json URL base

수동 실행:

./scripts/jenkins-desktop-pipeline.sh
# 또는
./scripts/build-desktop.sh --all
./scripts/publish-desktop-update.sh

3. 사용자 설치

macOS

  1. Jenkins → dist-desktop/*.dmg 또는 updates URL에서 다운로드
  2. DMG → Applications
  3. 최초 실행: 시스템 설정 → 개인정보 보호 → 확인 없이 열기

Windows

  1. *-setup.exe (NSIS) 다운로드
  2. SmartScreen → 추가 정보 → 실행

4. 앱 기능

  • 서버: http://exdev.co.kr/api (웹과 동일 계정·DB)
  • 위젯: OS 별도 창 (WebviewWindow)
  • 알림: 창 닫기 → 트레이 상주, STOMP + OS 알림
  • 업데이트: 설정 → 일반 → PC 앱 → 업데이트 확인

5. 업데이트 배포 흐름

git push main
  → Jenkins goldenChart-Desktop-Pipeline
  → build-desktop.sh (dmg + exe + updater bundles)
  → publish-desktop-update.sh (sign + latest.json)
  → frontend/public/desktop/updates/
  → (DESKTOP_DEPLOY_WEB=1) nginx 재배포
  → 클라이언트 앱 내 업데이트

6. Smoke Test

npm run smoke:desktop

로컬 개발 (Mac)

npm install

# 최초 1회 — Homebrew(~/homebrew) + Rust + NSIS/LLVM
npm run install:desktop:deps -- --mac-only   # macOS 빌드만 (빠름)
# npm run install:desktop:deps              # Windows 크로스 빌드 포함

source ~/.zprofile   # PATH 적용
npm run dev:desktop
npm run build:desktop:mac

산출물: desktop/src-tauri/target/release/bundle/dmg/GoldenChart_*.dmg

관리자 권한이 있으면 /opt/homebrew 정식 설치를 권장합니다 (bottle 사용, LLVM 빌드 시간 단축).