Commit graph

28 commits

Author SHA1 Message Date
matt wilkie
a61911f65b merge: resolve conflicts with main for PR #3146
- cross-version-smoke.yml: keep PR's matrix/PR-gate design over main's simpler version
- Makefile: incorporate main's test-cross-version and test-migration targets
- upgrade-smoke-test.sh: keep PR's Scenario 5 (mutation), SMOKE_VERSIONS multi-version mode, and gastownhall URL fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:30:03 -07:00
sahtechie-png
b599839bbb
fix: handle release archives that extract into a subdirectory (#3167)
Thanks @sahtechie-png for the thorough issue report and fix!
2026-04-10 11:05:30 -07:00
matt wilkie
7916e029bc
fix: remove ICU runtime dependency from release binaries (#3066)
The gms_pure_go build tag already tells go-mysql-server to use Go's
stdlib regex instead of ICU-backed go-icu-regex. However, .buildflags
and the Makefile were unconditionally injecting ICU linker flags
(including -licui18n -licuuc -licudata on Linux), which re-introduced
the ICU shared-library dependency at link time.

This caused release binaries to require a specific ICU version
(e.g., libicui18n.so.74), making them non-portable across Linux distros
with different ICU versions.

Changes:
- .buildflags: Remove ICU flag injection; only export CGO_ENABLED=1
- Makefile: Replace ICU4C detection block with BUILD_TAGS := gms_pure_go;
  use the tag for all platforms (not just Windows)
- scripts/verify-cgo.sh: Add readelf check to fail if ICU shared-library
  dependency is present in ELF binaries
- scripts/install.sh: Add -tags gms_pure_go to build_from_source()

CGO remains enabled for embedded Dolt support. Only the ICU regex
backend is swapped for Go's stdlib regex, which is sufficient since
bd does not use SQL REGEXP functions.

Amp-Thread-ID: https://ampcode.com/threads/T-019d6450-7b10-77ee-b3d0-58e9474e61da

Co-authored-by: Amp <amp@ampcode.com>
2026-04-07 09:48:44 -07:00
matt wilkie
21910a8994 [codex] Fix installer ICU/CGO fallback handling (#2965)
* Fix shared-server init mode selection

* Warn on shared-server embedded metadata mismatch

* Fix installer ICU/CGO fallback handling
2026-04-01 17:21:17 -07:00
matt wilkie
dbcc2db0a9
[codex] Fix installer ICU/CGO fallback handling (#2965)
* Fix shared-server init mode selection

* Warn on shared-server embedded metadata mismatch

* Fix installer ICU/CGO fallback handling
2026-04-01 16:52:53 -07:00
eitsupi
41001f7a07 fix(install): redirect log functions to stderr to fix WSL platform detection
log_info, log_success, and log_warning wrote to stdout, while only
log_error wrote to stderr. Inside detect_platform(), which is called
via command substitution `platform=$(detect_platform)`, the WSL
warning messages were captured into the platform variable, producing
a malformed download URL like:
  beads_0.62.0_==> WSL (Windows Subsystem for Linux) detected...linux_amd64.tar.gz

Fix by redirecting all log functions to stderr, consistent with
log_error and standard shell convention (stdout = data, stderr = diagnostics).
Also redirect bare echo calls inside detect_platform to stderr.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 06:59:14 +00:00
maphew
4d23a6cc7e harden installers and docs for transparent trust model (GH#1857)
Amp-Thread-ID: https://ampcode.com/threads/T-019cf2b7-8afa-717c-abda-e7a8000e1b9b
Co-authored-by: Amp <amp@ampcode.com>
2026-03-15 12:02:56 -07:00
matt wilkie
b515661f7d fix: skip sleep in CI/non-interactive environments 2026-03-06 14:42:03 -07:00
matt wilkie
fbbaa5ecc0 fix: detect WSL and MINGW/MSYS/CYGWIN in install.sh
When users run install.sh from Git Bash, MSYS2, or Cygwin on Windows,
the script now detects these environments and directs them to use
install.ps1 instead of silently installing a Linux binary.

When running under WSL, the script warns that the install will only be
usable inside WSL and suggests install.ps1 for native Windows use,
then continues after a 5-second pause.

Fixes #1980

Amp-Thread-ID: https://ampcode.com/threads/T-019cc486-ad63-76ea-9f02-2901e2430428
Co-authored-by: Amp <amp@ampcode.com>
2026-03-06 12:06:37 -07:00
beads/crew/emma
bd68c87b00 fix: remove stale embedded Dolt references after server-only migration
Delete broken store_nocgo_test.go (references undefined errNoCGO),
remove dead bootstrapEmbeddedDolt/hasDoltSubdir functions, and clean up
stale comments and docs that still referenced embedded mode, CGO
requirements, or in-process Dolt across 20 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-21 16:59:44 -08:00
zenchantlive
55f06f9856
fix(release): prevent non-CGO bd binaries from shipping (#1870)
* fix(release): prevent non-CGO bd binaries from shipping

* fix: make verify-cgo.sh executable

GoReleaser invokes this as ./scripts/verify-cgo.sh which requires +x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: beads/crew/collins <steve.yegge@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 14:21:22 -08:00
ZenchantLive
818c6f0226 docs: remove stale daemon command references (GH#1819) 2026-02-18 22:50:21 -08:00
Steve Yegge
e1341bbf68
Merge pull request #1496 from maphew/fix/1409-build-deps-docs
Document ICU build deps and add installer hint
2026-02-05 08:44:05 -08:00
Matt Wilkie
1a6beddbc8 Document ICU build deps and hint in installer (bd-1409) 2026-02-04 09:30:52 -07:00
Patrick Farrell
51dc5ffed6 feat: add 'beads' alias for bd command during installation
Add a 'beads' symlink/alias that points to the 'bd' binary across all
installation methods, allowing users to invoke the tool using either
'bd' or 'beads'.

Changes:
- Makefile: Create 'beads' symlink in install target
- scripts/install.sh: Add create_beads_alias function, call it in all
  three installation paths (release download, go install, build from source)
- flake.nix: Add 'beads' symlink in Nix package installPhase
- install.ps1: Add Create-BeadsAlias function for Windows (creates a copy
  since symlinks require admin privileges)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:19:00 +00:00
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