Commit Graph

239 Commits

Author SHA1 Message Date
aaddrick
ee24235d12 feat: add Claude Code hooks and /simplify skill for code quality
Add automated code quality tooling:

- PreToolUse hook: runs shellcheck/actionlint before PR creation
- PostToolUse hook: triggers cdd-code-simplifier after PR creation
- /simplify skill: manually invoke code simplifier with optional guidance
- STYLEGUIDE.md: Bash style guide from style.ysap.sh
- Update CLAUDE.md and cdd-code-simplifier agent to reference style guide

Fixes #199

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-25 03:02:38 -05:00
aaddrick
039d0bfe60 docs: add guidance for new package formats and repositories
Add section to CLAUDE.md with lessons learned from RPM signing:
- Research target system constraints before implementing
- Consider concurrency when multiple jobs push to same branch
- Test full pipeline before merging
- Common CI pitfalls table (GPG flags, push races, version formats)

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 15:03:03 -05:00
Aaddrick
fb83eb4bc2 Merge pull request #197 from aaddrick/fix/197-push-retry
fix: add retry loop for gh-pages push race condition
v1.3.8+claude1.1.799
2026-01-24 14:36:56 -05:00
aaddrick
a905d4b3cf fix: add retry loop for gh-pages push race condition
Both APT and DNF repo update jobs push to gh-pages, and the
pages-build-deployment action also modifies it. This can cause
push failures when the ref changes between pull and push.

Added a retry loop (5 attempts with 5s delay) to handle this.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 14:36:42 -05:00
Aaddrick
02ef5d8b4a Merge pull request #196 from aaddrick/fix/196-gh-pages-race
fix: add git pull --rebase before pushing to gh-pages
2026-01-24 13:38:43 -05:00
aaddrick
d2a5c2d137 fix: add git pull --rebase before pushing to gh-pages
Fixes race condition when both APT and DNF repo update jobs
try to push to gh-pages simultaneously.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 13:38:22 -05:00
Aaddrick
a6b832eab9 Merge pull request #195 from aaddrick/fix/195-gpg-overwrite
fix: add --yes flag to gpg to overwrite existing signature
2026-01-24 13:31:41 -05:00
aaddrick
030d3d364c fix: add --yes flag to gpg to overwrite existing signature
The repomd.xml.asc file persists in the gh-pages branch, causing
"gpg: signing failed: File exists" on subsequent releases.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 13:31:28 -05:00
Aaddrick
5f7398554b Merge pull request #194 from aaddrick/fix/194-gpg-batch-mode
fix: add --batch flag to gpg for non-interactive CI signing
2026-01-24 13:25:00 -05:00
aaddrick
896781f556 fix: add --batch flag to gpg for non-interactive CI signing
The gpg --detach-sign command was failing in CI with:
  gpg: cannot open '/dev/tty': No such device or address

Adding --batch flag allows GPG to run without TTY access.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 13:24:43 -05:00
Aaddrick
6549b16929 Merge pull request #193 from aaddrick/fix/191-rpm-gpg-signing
fix: handle hyphenated versions in RPM build script
2026-01-24 13:17:43 -05:00
aaddrick
fa45dbba7e fix: handle hyphenated versions in RPM build script
RPM Version field cannot contain hyphens (they're used to separate
Version from Release). When a version like "1.1.799-1.3.3" is passed:
- Split into rpm_version="1.1.799" and rpm_release="1.3.3"
- Use these in the spec file instead of hardcoded Release: 1

This fixes the build error:
  error: line 2: Illegal char '-' (0x2d) in: Version: 1.1.799-1.3.3

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 13:16:32 -05:00
Aaddrick
18628a8c02 Merge pull request #192 from aaddrick/fix/191-rpm-gpg-signing
fix: sign RPM packages with GPG key for DNF repository
2026-01-24 13:11:21 -05:00
aaddrick
d4440a7912 fix: sign RPM packages with GPG key for DNF repository
Add RPM package signing to the update-dnf-repo job so that packages
can be installed with gpgcheck=1 (the default in the repo file).

Changes:
- Install rpm package (provides rpmsign command)
- Configure ~/.rpmmacros with GPG signing settings
- Sign each RPM with rpmsign --addsign before createrepo_c
- Renamed loop variable from 'rpm' to 'rpm_file' to avoid conflicts

Fixes #191

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 13:03:22 -05:00
Aaddrick
b266b72dbd Merge pull request #190 from aaddrick/claude/investigate-workflow-failure-Da2qf
fix: add wrapper version suffix to package versions for unique releases
2026-01-24 12:47:32 -05:00
Claude
3e587d3059 fix: add wrapper version suffix to package versions for unique releases
The APT repository update was failing with exit code 254 because
reprepro rejected duplicate packages. When multiple releases use the
same Claude Desktop version (e.g., v1.3.0, v1.3.1, v1.3.2 all using
claude1.1.799), the packages had identical versions causing conflicts.

Changes:
- Add --release-tag flag to build.sh to accept the full release tag
- Extract wrapper version from tag (v1.3.2+claude1.1.799 -> 1.3.2)
- Append wrapper version as Debian revision suffix (1.1.799-1.3.2)
- Update CI workflows to pass release tag on tag builds

This ensures each release produces packages with unique versions that
APT can properly handle for upgrades (1.1.799-1.3.2 > 1.1.799-1.3.1).

Fixes workflow failure in run #21318689829

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 17:36:42 +00:00
Aaddrick
90ac042c35 Merge pull request #188 from aaddrick/feature/187-multi-distro-support
feat: add multi-distro support with RPM packaging
2026-01-24 12:00:30 -05:00
aaddrick
cf7bf5e15e refactor: simplify multi-distro code for clarity and maintainability
- Replace nested case statements with associative arrays in check_dependencies()
- Consolidate deb/rpm packaging handlers in run_packaging()
- Merge deb|rpm cases in print_next_steps()
- Fix escape inconsistency in build-rpm-package.sh heredoc

Co-Authored-By: Claude <claude@anthropic.com>
v1.3.2+claude1.1.799
2026-01-24 11:56:31 -05:00
aaddrick
a359aa0edb fix: remove unused variables to pass shellcheck
- Remove unused rpm_arch variable from build.sh
- Comment out unused maintainer parameter in build-rpm-package.sh

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 11:48:00 -05:00
aaddrick
1b5379857e fix: allow running as root in CI/container environments
- Skip root user check when CI, GITHUB_ACTIONS env vars are set,
  or when /.dockerenv exists (container detection)
- Skip sudo when already running as root for dependency installation

This fixes the RPM build failures in GitHub Actions where the
Fedora container runs as root by default.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 11:28:44 -05:00
aaddrick
f5460b9ddd ci: add DNF repository for Fedora/RHEL users
- Add update-dnf-repo job to CI workflow that:
  - Creates rpm/x86_64 and rpm/aarch64 directories on gh-pages
  - Uses createrepo_c to generate repository metadata
  - Creates claude-desktop.repo file for easy installation
- Update README with DNF repository installation instructions
- Add DNF repository removal instructions to uninstallation section

Users can now install on Fedora/RHEL with:
  sudo curl -fsSL https://aaddrick.github.io/claude-desktop-debian/rpm/claude-desktop.repo \
    -o /etc/yum.repos.d/claude-desktop.repo
  sudo dnf install claude-desktop

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 11:18:21 -05:00
aaddrick
e2b3bed5fb ci: add RPM package builds to CI pipeline
- Update build-amd64.yml and build-arm64.yml to support RPM builds
  using Fedora 42 container when artifact_suffix is 'rpm'
- Add RPM to artifact path patterns for upload
- Add rpm matrix entries for both amd64 and arm64 in ci.yml
- Download RPM artifacts in release job

RPM packages are now built alongside deb and AppImage for each release.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 11:01:31 -05:00
aaddrick
86a182266a feat: add multi-distro support with RPM packaging
- Refactor detect_architecture() to use uname -m instead of dpkg
- Add detect_distro() to identify debian/rpm/unknown distro families
- Update check_dependencies() to support both apt (Debian) and dnf (Fedora)
- Add 'rpm' as valid build format with auto-detection based on distro
- Create scripts/build-rpm-package.sh for RPM package generation
- Update README with RPM/Fedora installation and build instructions

The build script now automatically selects the appropriate package format:
- Debian/Ubuntu: .deb (default)
- Fedora/RHEL: .rpm (default)
- Other: .AppImage (default)

Users can still override with --build deb|rpm|appimage on any distro.

Closes #187

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 10:59:53 -05:00
Aaddrick
78331b8804 Merge pull request #186 from aaddrick/feature/185-apt-repository
feat: Add APT repository for package installation and updates
v1.3.1+claude1.1.799
2026-01-24 09:12:18 -05:00
aaddrick
9707272305 fix: add Section and Priority fields to deb control file
reprepro requires Section and Priority fields in the control file.
Add these to build-deb-package.sh and use --section/--priority flags
in CI workflow for backwards compatibility with older packages.

Tested locally with reprepro and apt - repository works correctly.

Part of #185

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 09:01:43 -05:00
aaddrick
03749b2f1a docs: add APT repository installation instructions to README
- Add new "Using APT Repository" section as recommended installation method
- Include commands for adding GPG key and repository
- Update uninstallation section with APT removal instructions
- Update softprops/action-gh-release from v1 to v2 (fixes actionlint warning)

Part of #185

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 08:56:55 -05:00
aaddrick
c49bfc59d4 feat: add APT repository update job to CI workflow
Add new workflow job that runs after release to update the APT
repository hosted on GitHub Pages:

- Downloads amd64 and arm64 .deb artifacts
- Uses reprepro to add packages to the repository
- Commits and pushes changes to gh-pages branch

Requires APT_GPG_PRIVATE_KEY secret to be configured.

Part of #185

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 08:50:51 -05:00
aaddrick
435cfa5c46 docs: add issue investigation workflow to CLAUDE.md
Add guidance on reviewing code state at time of issue creation
to identify if issues have already been addressed in later commits.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 08:17:15 -05:00
Aaddrick
1d49b0b292 Merge pull request #184 from aaddrick/claude/review-issue-156-isgka
docs: add troubleshooting section for OAuth 401 errors
2026-01-23 21:09:16 -05:00
Claude
777d6db312 docs: add troubleshooting section for OAuth 401 errors
Add documentation for fixing recurring API 401 errors caused by
cached OAuth token expiration. Credits MrEdwards007 for the fix
and links to issue #156 and the scripted solution.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-24 01:47:40 +00:00
github-actions[bot]
a47885857a Update Claude Desktop download URLs to version 1.1.799
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.0+claude1.1.799
2026-01-24 01:35:12 +00:00
Aaddrick
2c6aa00896 Merge pull request #183 from aaddrick/fix/182-remove-unused-package-files
Remove unused root package.json and package-lock.json
2026-01-22 22:58:33 -05:00
aaddrick
384b1ba16f chore: remove unused root package.json and package-lock.json
These files are not used by the build process:
- Build script creates its own package.json in build/
- No CI workflows reference these files
- No node_modules exists in root

Fixes #182

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 22:57:25 -05:00
Aaddrick
245165028a Merge pull request #181 from aaddrick/next
Merge next to main: Build script refactoring
2026-01-22 22:48:01 -05:00
aaddrick
b6e2d6757c fix: add shellcheck disable for intentional backticks 2026-01-22 22:42:04 -05:00
aaddrick
5468f539d2 Merge origin/main into next: resolve conflict keeping refactored build.sh 2026-01-22 22:38:29 -05:00
Aaddrick
a845b3defb Merge pull request #180 from aaddrick/refactor/179-build-scripts
Refactor build scripts for maintainability and style guide compliance
2026-01-22 22:34:44 -05:00
aaddrick
424e17ba98 refactor: simplify build scripts and update version workflow
Code simplifications from cdd-code-simplifier:
- Consolidate duplicate argument validation in build.sh
- Use early returns to reduce nesting depth
- Convert multi-line conditionals to single-line where clearer
- Simplify icon array in build-deb-package.sh
- Refactor appimagetool discovery loop in build-appimage.sh

Additional changes:
- Update Claude Desktop URLs to v1.1.673 (from main)
- Fix check-claude-version.yml patterns for lowercase variable names
- Add version check guidance to CLAUDE.md

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 22:29:18 -05:00
aaddrick
2663f529af refactor: apply bash style guide to all build scripts
Apply consistent bash style guide (style.ysap.sh) across all scripts:

- Change shebang to #!/usr/bin/env bash
- Remove set -e/set -euo pipefail, add explicit error handling
- Convert indentation from 4 spaces to tabs
- Use lowercase for variables, UPPERCASE only for exports/constants
- Use [[ ]] for conditionals, (( )) for arithmetic
- Use single quotes for literals, double quotes for expansion
- Remove emoji characters from output messages

Files refactored:
- build.sh (~991 lines)
- scripts/build-appimage.sh (~311 lines)
- scripts/build-deb-package.sh (~242 lines)
- scripts/launcher-common.sh (~95 lines)

Tested: AppImage build completes successfully in distrobox.

Fixes #179

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 22:05:52 -05:00
aaddrick
2941d39d55 chore: add cdd-code-simplifier plugin for bash scripts
Add project-level code simplifier agent adapted for bash/shell
scripting best practices. Includes guidelines for:
- Function organization and local variables
- Variable quoting and naming conventions
- Error handling patterns
- Shellcheck recommendations

Uses standalone agent in .claude/agents/ for project-specific use.
Also removes .claude/ from .gitignore to allow tracking.

Part of #179

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 20:57:16 -05:00
github-actions[bot]
d45cad6f40 Update Claude Desktop download URLs to version 1.1.673
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.2.4+claude1.1.673
2026-01-23 01:35:37 +00:00
aaddrick
29173e9d17 refactor: organize build.sh into logical functions
Restructure build.sh from a monolithic script into 26 well-organized
functions grouped by purpose:

- Utility: check_command, section_header, section_footer
- Setup: detect_architecture, check_system_requirements, parse_arguments,
  check_dependencies, setup_work_directory, setup_nodejs, setup_electron_asar
- Download: download_claude_installer
- Patching: patch_app_asar, patch_titlebar_detection, patch_tray_menu_handler,
  patch_tray_icon_selection, patch_quick_window, patch_linux_claude_code
- Build: install_node_pty, finalize_app_asar, stage_electron, process_icons,
  copy_locale_files
- Packaging: run_packaging, cleanup_build, print_next_steps
- Main: orchestrates all phases

Global variables declared at top, main() provides clear execution flow.

Part of #179

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 17:38:07 -05:00
aaddrick
ee5e0902ff refactor: extract shared launcher logic to common library
- Create scripts/launcher-common.sh with shared functions:
  - setup_logging(), log_message()
  - detect_display_backend(), check_display()
  - build_electron_args(), setup_electron_env()
- Update build-appimage.sh to use shared library
- Update build-deb-package.sh to use shared library
- Reduces duplication by ~94 lines

Part of #179

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 16:48:20 -05:00
aaddrick
4bf59866a3 refactor: extract embedded JS files from build.sh
- Extract frame-fix-wrapper.js to scripts/frame-fix-wrapper.js
- Extract claude-native stub to scripts/claude-native-stub.js
- Remove duplicate claude-native stub (was defined twice)
- Reduces build.sh by ~145 lines

Part of #179

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 16:28:56 -05:00
aaddrick
a149815639 docs: add commit attribution guidelines
Include Co-Authored-By trailer requirement for commits
made with AI assistance.

Co-Authored-By: Claude <claude@anthropic.com>
2026-01-22 16:15:04 -05:00
aaddrick
1945516acf docs: simplify attribution format for issues
Change issue attribution to use simplified format (same as comments)
while keeping full attribution format for PRs only.
2026-01-22 16:12:29 -05:00
Aaddrick
a6a9f301e9 Merge pull request #176 from aaddrick/fix/174-cleanup-age-filter
ci: only delete non-release runs older than 3 days
2026-01-21 05:53:32 -05:00
aaddrick
2fc3f8ebd5 ci: only delete non-release runs older than 3 days
Update cleanup workflow to preserve recent runs for debugging purposes.
Now only deletes runs that are both:
- Not tied to a release tag (headBranch doesn't start with "v")
- Older than 3 days

Relates to #174
2026-01-21 05:52:42 -05:00
Aaddrick
776e4d4aa0 Merge pull request #175 from aaddrick/feature/174-workflow-cleanup
ci: add workflow to clean up non-release runs
2026-01-21 05:43:57 -05:00
aaddrick
0c13cb8776 ci: add workflow to clean up non-release runs
Add a scheduled GitHub Action that runs weekly (Thursday midnight UTC)
to delete workflow runs not tied to release tags. Preserves runs where
headBranch starts with "v" (release tags like v1.2.4+claude1.1.381).

Can also be triggered manually via workflow_dispatch.

Fixes #174
2026-01-21 05:37:45 -05:00