feat: add multi-platform packaging and auto-update infrastructure

- Add PyInstaller configuration (clide.spec) for cross-platform builds
- Add build scripts for macOS (DMG), Linux (AppImage), and Windows (Inno Setup)
- Add Gitea Actions CI/CD workflow for automated releases
- Add auto-update service with Gitea API integration
- Add 'clide update' CLI command for checking and installing updates

Packaging outputs:
- macOS: Signed/notarized .app bundle in DMG
- Linux: Portable AppImage (glibc 2.17+)
- Windows: Inno Setup installer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-02-01 22:51:36 +01:00
co-authored by Claude Opus 4.5
parent 8b1a84e7e2
commit aff03a2e9b
11 changed files with 1032 additions and 10 deletions
+36 -10
View File
@@ -1,9 +1,10 @@
.PHONY: setup run test test-single typecheck lint format build build-all clean help
.PHONY: setup run test test-single typecheck lint format build build-macos build-linux build-windows build-all clean help
PYTHON := python3.12
VENV := .venv
BIN := $(VENV)/bin
TEST ?= tests/
VERSION ?= 1.0.0
# Colors for output
BLUE := \033[0;34m
@@ -13,15 +14,21 @@ RESET := \033[0m
help:
@echo "$(BLUE)Clide Development Commands$(RESET)"
@echo ""
@echo "$(GREEN)setup$(RESET) Create venv and install dependencies"
@echo "$(GREEN)run$(RESET) Run the application"
@echo "$(GREEN)test$(RESET) Run all tests"
@echo "$(GREEN)test-single$(RESET) Run single test (TEST=path::test_name)"
@echo "$(GREEN)typecheck$(RESET) Run mypy type checking"
@echo "$(GREEN)lint$(RESET) Run ruff linter"
@echo "$(GREEN)format$(RESET) Run ruff formatter"
@echo "$(GREEN)build$(RESET) Build executable for current platform"
@echo "$(GREEN)clean$(RESET) Remove build artifacts and caches"
@echo "$(GREEN)setup$(RESET) Create venv and install dependencies"
@echo "$(GREEN)run$(RESET) Run the application"
@echo "$(GREEN)test$(RESET) Run all tests"
@echo "$(GREEN)test-single$(RESET) Run single test (TEST=path::test_name)"
@echo "$(GREEN)typecheck$(RESET) Run mypy type checking"
@echo "$(GREEN)lint$(RESET) Run ruff linter"
@echo "$(GREEN)format$(RESET) Run ruff formatter"
@echo "$(GREEN)build$(RESET) Build executable for current platform"
@echo "$(GREEN)clean$(RESET) Remove build artifacts and caches"
@echo ""
@echo "$(BLUE)Distribution Builds$(RESET)"
@echo ""
@echo "$(GREEN)build-macos$(RESET) Build macOS DMG (VERSION=x.x.x)"
@echo "$(GREEN)build-linux$(RESET) Build Linux AppImage (VERSION=x.x.x)"
@echo "$(GREEN)build-windows$(RESET) Build Windows installer (VERSION=x.x.x)"
setup:
@echo "Creating virtual environment..."
@@ -93,3 +100,22 @@ ci-test:
ci-build:
pip install -e ".[build]"
pyinstaller clide.spec --clean
# Distribution builds
build-macos:
@echo "$(BLUE)Building macOS distribution...$(RESET)"
./scripts/build-macos.sh $(VERSION)
build-linux:
@echo "$(BLUE)Building Linux AppImage...$(RESET)"
./scripts/build-linux.sh $(VERSION)
build-windows:
@echo "$(BLUE)Building Windows installer...$(RESET)"
powershell -ExecutionPolicy Bypass -File scripts/build-windows.ps1 -Version $(VERSION)
build-all: build-linux
@echo ""
@echo "$(GREEN)Linux build complete.$(RESET)"
@echo "$(BLUE)Note:$(RESET) macOS build requires: make build-macos VERSION=$(VERSION)"
@echo "$(BLUE)Note:$(RESET) Windows build requires Windows: make build-windows VERSION=$(VERSION)"