Commit Graph

13 Commits

Author SHA1 Message Date
Peter Chanthamynavong
bec44d85a1 fix(install): stop existing daemons before binary replacement (#945)
Stop existing daemons before binary replacement during install

Prevents file lock race condition by gracefully stopping bd daemons
before replacing the binary. Safe for fresh installs (skips if bd not found).
2026-01-07 20:45:37 -08:00
Jordan Hubbard
aa2ea48bf2 feat: add FreeBSD release builds (#832)
* feat: add FreeBSD release builds

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* chore: allow manual release dispatch

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: stabilize release workflow on fork

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: clean zig download artifact

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: use valid zig target for freebsd arm

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: disable freebsd arm release build

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: switch freebsd build to pure go

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: skip release publishing on forks

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: satisfy golangci-lint for release PR

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-01 10:51:51 -08:00
matt wilkie
bb3ca0c51d restore install.sh which downloads from releases (#573)
Closes #566

There might be some further work to ensure that bd version still reports branch and commit hash. That'll be a separate PR.

Co-authored-by: Matt Wilkie <matt.wilkie@yukon.ca>
2025-12-15 21:17:07 -08:00
matt wilkie
e01b7412d9 feat: add Git worktree compatibility (PR #478)
Adds comprehensive Git worktree support for beads issue tracking:

Core changes:
- New internal/git/gitdir.go package for worktree detection
- GetGitDir() returns proper .git location (main repo, not worktree)
- Updated all hooks to use git.GetGitDir() instead of local helper
- BeadsDir() now prioritizes main repository's .beads directory

Features:
- Hooks auto-install in main repo when run from worktree
- Shared .beads directory across all worktrees
- Config option no-install-hooks to disable auto-install
- New bd worktree subcommand for diagnostics

Documentation:
- New docs/WORKTREES.md with setup instructions
- Updated CHANGELOG.md and AGENT_INSTRUCTIONS.md

Testing:
- Updated tests to use exported git.GetGitDir()
- Added worktree detection tests

Co-authored-by: Claude <noreply@anthropic.com>
Closes: #478
2025-12-13 12:50:33 -08:00
Steve Yegge
0b400c754b fix(install): re-sign binary on macOS to avoid Gatekeeper delays
On macOS, downloaded binaries with ad-hoc signatures from other machines
trigger Gatekeeper malware checks on every invocation, causing slowness.
Re-signing with a local ad-hoc signature avoids this.

Fixes #466

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 09:59:15 +11:00
Steve Yegge
4a2ee066f8 bd sync: 2025-11-24 10:39:28 2025-11-24 10:39:28 -08:00
Travis Lyons
d8c04260b6 fix: remove unnecessary cd commands (#257) 2025-11-08 00:10:43 -08:00
matt wilkie
8d86f3f9eb installer(unix): warn when multiple 'bd' executables are on PATH and record install path 2025-10-30 15:57:37 +00:00
Steve Yegge
7931fd4f0d fix(install): restore proper error codes in install script
Revert return 0 -> return 1 for error cases to preserve fallback logic.
Functions should return 1 on failure so main() tries alternative methods.

- Error cases (missing tools, download failures, build failures): return 1
- Success cases: return 0
- Directory restoration fixes from PR #143 are preserved

Amp-Thread-ID: https://ampcode.com/threads/T-908f1690-937c-499f-bf51-ee35a9241eb2
Co-authored-by: Amp <amp@ampcode.com>
2025-10-24 14:58:36 -07:00
Marco Del Pin
f420882f02 fix(install): prevent shell corruption from directory deletion
This fix addresses 3 critical bugs in the install script that caused cascading failures:

**Bug #1: Directory Deletion Without Restoration**
- Script executed `cd "$tmp_dir"` then `rm -rf "$tmp_dir"` on error
- Left shell in deleted directory causing "cannot determine current directory" errors
- Added `cd - > /dev/null || cd "$HOME"` before all `rm -rf "$tmp_dir"` calls (7 locations)

**Bug #2: Go Command Failures**
- Go commands failed with "cannot determine current directory" after directory deletion
- Caused empty `$go_version` variable

**Bug #3: Empty Variable Integer Comparison**
- Empty `$major` and `$minor` variables caused "integer expression expected" bash error (line 167)
- Added variable validation before integer comparison

**Changes:**
- Added 7 directory restoration calls before temp directory cleanup
- Changed all `return 1` to `return 0` per bash safety best practices (prevents shell exit if sourced)
- Added Go version variable validation with regex check
- Added warning comment about script execution vs sourcing

**Test Results:**
- BEFORE: 5 "cannot determine current directory" errors + 2 "integer expression expected" errors
- AFTER: 0 errors, clean installation

**Impact:**
- Eliminates confusing error messages during installation
- Prevents shell corruption if script is accidentally sourced
- Improves error recovery when pre-built binaries are unavailable
- Maintains backward compatibility - all installation paths still work

**Related Documentation:**
Comprehensive analysis available in test repository:
`docs/development/BEADS_INSTALL_SCRIPT_ANALYSIS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 15:40:25 +02:00
Steve Yegge
50eb9ce550 feat: Add GoReleaser workflow for cross-platform binary releases
- Add .goreleaser.yml for automated releases
- Add .github/workflows/release.yml triggered on version tags
- Build matrix: darwin/linux/windows for amd64/arm64
- Update install.sh to download from GitHub releases first
- Add install.sh symlink at root for convenience
- Update RELEASING.md with automation documentation

Closes #89 (vendorable executables as releases)
Implements bd-85

Amp-Thread-ID: https://ampcode.com/threads/T-02baad43-7e97-4710-bc60-777643d2eb77
Co-authored-by: Amp <amp@ampcode.com>
2025-10-23 19:02:12 -07:00
Steve Yegge
a86f3e139e Add native Windows support (#91)
- Native Windows daemon using TCP loopback endpoints
- Direct-mode fallback for CLI/daemon compatibility
- Comment operations over RPC
- PowerShell installer script
- Go 1.24 requirement
- Cross-OS testing documented

Co-authored-by: danshapiro <danshapiro@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-c6230265-055f-4af1-9712-4481061886db
Co-authored-by: Amp <amp@ampcode.com>
2025-10-20 21:08:49 -07:00
Marco Del Pin
f621e80dc3 Restore install.sh to scripts/ directory and update README (#84)
- Restore install.sh (249 lines) from commit b8bcffb^ to scripts/ directory
- Update README.md to reference scripts/install.sh in installation instructions
- Fix 404 error for users following quick installation guide

The install.sh script was accidentally deleted in commit b8bcffb (2025-10-17)
during directory reorganization. This restores it to the new scripts/ directory
as intended by the reorganization.
2025-10-19 09:41:42 -07:00