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
5 changes: 5 additions & 0 deletions .facts
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,11 @@
command: grep -q 'manualChunks' app/vite.config.ts
tags: [implemented]
- Harbor App Profiles loads profiles under a dot-prefixed Harbor home without a Tauri forbidden-path error @spec @issue-64 @implemented
- Harbor AppImage builds use Tauri CLI 2.11.4 or later so AppDir icon and desktop symlinks remain valid after mounting @appimage @implemented
- Harbor README starts with the application name before any shell examples @appimage @implemented
- App pull requests build an AppImage and run the catalog test without creating a release @appimage @implemented
- Harbor AppImage builds make the cached AppRun launcher executable for every user before bundling @appimage @implemented
- Harbor App production bundles initialize React before Markdown components @appimage @implemented

# boost
- label: Boost is a FastAPI LLM proxy that exposes OpenAI chat completions and optional Anthropic and Responses compat layers
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Harbor App Release

on:
workflow_dispatch:
pull_request:
paths:
- app/**
- .github/workflows/app-release.yml
push:
branches:
- "main"
Expand All @@ -11,11 +15,75 @@ on:
types: [published]

jobs:
check-appimage:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- uses: dtolnay/rust-toolchain@stable
- name: Install build and catalog test dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev appstream gawk jq gnupg2 sudo imagemagick libasound2-dev pulseaudio-utils alsa-utils alsa-oss libjack0 desktop-file-utils xmlstarlet xsel xterm xvfb icewm x11-utils x11-apps netpbm xdotool libgl1-mesa-dri libgl1-mesa-dev mesa-utils libosmesa6 libsdl1.2-dev libsdl2-2.0-0 fonts-wqy-microhei libfile-mimeinfo-perl tesseract-ocr tesseract-ocr-eng tesseract-ocr-chi-sim tesseract-ocr-ara tesseract-ocr-rus tesseract-ocr-ell libfuse2 stalonetray
sudo gem install dupervisor -v 1.0.5 --no-document
sudo npm install -g asar
- name: Build AppImage
run: |
bun ./.scripts/docs-to-app.ts
cd app
bun install --frozen-lockfile
bun tauri build --bundles appimage -- --locked
- uses: actions/checkout@v4
with:
repository: AppImage/appimage.github.io
ref: 2c518882fd364ad4e1c4148a1b1c1a2fa5fc5e31
path: .appimage-catalog
sparse-checkout: code
- name: Run catalog test
working-directory: .appimage-catalog
env:
DISPLAY: :99
IS_PULLREQUEST: true
STRICT: true
run: |
bash code/fetch-deps.sh
cp -a deps/. .
sudo bash code/prep-dummy-soundcard.sh
mkdir -p data apps database "$HOME/.icewm"
printf 'ShowTaskBar = 0\nTaskBarAutoHide = 1\n' > "$HOME/.icewm/preferences"
BUNDLE_DIR="$GITHUB_WORKSPACE/app/src-tauri/target/release/bundle/appimage"
APPIMAGE=$(find "$BUNDLE_DIR" -maxdepth 1 -name '*.AppImage' -printf '%f\n')
printf 'http://127.0.0.1:8765/%s\n' "$APPIMAGE" > data/Harbor
python3 -m http.server 8765 --bind 127.0.0.1 --directory "$BUNDLE_DIR" > http.log 2>&1 &
SERVER_PID=$!
Xvfb :99 -screen 0 800x600x24 > xvfb.log 2>&1 &
XVFB_PID=$!
trap 'kill "$SERVER_PID" "$XVFB_PID" 2>/dev/null || true' EXIT
timeout --kill-after=30 600 bash -e code/worker.sh "$PWD/data/Harbor" 2>&1 | tee log.txt
- uses: actions/upload-artifact@v4
if: always()
with:
name: appimage-catalog-result
path: |
.appimage-catalog/*.log
.appimage-catalog/log.txt
.appimage-catalog/database/Harbor/
.appimage-catalog/failure-screens/
retention-days: 7

test:
if: github.event_name != 'pull_request'
name: Test Matrix
uses: ./.github/workflows/test.yml

publish-tauri:
if: github.event_name != 'pull_request'
needs: test
permissions:
contents: write
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Harbor

https://github.com/user-attachments/assets/e4897391-c5a8-4391-93c3-9f8b76155f11

[![GitHub Tag](https://img.shields.io/github/v/tag/av/harbor)](https://github.com/av/harbor/releases)
Expand Down
Binary file modified app/bun.lockb
Binary file not shown.
96 changes: 48 additions & 48 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"@vitejs/plugin-react": "^4.7.0",
"typescript": "^5.8.2",
"vite": "^5.4.21",
"@tauri-apps/cli": "^2.11.2"
"@tauri-apps/cli": "^2.11.4"
}
}
11 changes: 11 additions & 0 deletions app/scripts/prepare-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/tauri"
launcher="$cache_dir/AppRun-$(uname -m)"
mkdir -p "$cache_dir"
if [ ! -f "$launcher" ]; then
curl -fL "https://github.com/tauri-apps/binary-releases/releases/download/apprun-old/$(basename "$launcher")" -o "$launcher.download"
mv "$launcher.download" "$launcher"
fi
chmod 755 "$launcher"
5 changes: 5 additions & 0 deletions app/src-tauri/tauri.linux.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"build": {
"beforeBundleCommand": "bash scripts/prepare-appimage.sh"
}
}
1 change: 1 addition & 0 deletions app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig(async () => ({
rollupOptions: {
output: {
manualChunks(id: string) {
if (id.includes("commonjsHelpers.js")) return "react";
if (!id.includes("node_modules")) return;
if (id.includes("refractor") || id.includes("highlight.js")) return "syntax";
if (
Expand Down
Loading