Merge branch 'main' of github.com:steveyegge/beads

Amp-Thread-ID: https://ampcode.com/threads/T-37164fd7-6452-40b0-b5dd-c13672dcb843
Co-authored-by: Amp <amp@ampcode.com>

# Conflicts:
#	.beads/beads.jsonl
This commit is contained in:
Steve Yegge
2025-11-07 15:56:17 -08:00
4 changed files with 186 additions and 151 deletions

File diff suppressed because one or more lines are too long

View File

@@ -26,6 +26,11 @@ jobs:
with:
go-version: '1.23'
- name: Install cross-compilation toolchains
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:

View File

@@ -9,28 +9,65 @@ before:
- go mod tidy
builds:
- id: bd
- id: bd-linux-amd64
main: ./cmd/bd
binary: bd
env:
- CGO_ENABLED=0
- CGO_ENABLED=1
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: linux
goarch: arm64
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Build={{.ShortCommit}}
- id: bd-darwin-amd64
main: ./cmd/bd
binary: bd
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- amd64
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Build={{.ShortCommit}}
- id: bd-darwin-arm64
main: ./cmd/bd
binary: bd
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- arm64
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Build={{.ShortCommit}}
- id: bd-windows-amd64
main: ./cmd/bd
binary: bd
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Build={{.ShortCommit}}
- -buildmode=exe
archives:
- id: bd-archive
format: tar.gz

View File

@@ -147,11 +147,11 @@ func FindDatabasePath() string {
// Look for any .db file in the beads directory
matches, err := filepath.Glob(filepath.Join(absBeadsDir, "*.db"))
if err == nil && len(matches) > 0 {
// Filter out backup files and vc.db
// Filter out backup files only
var validDBs []string
for _, match := range matches {
baseName := filepath.Base(match)
if !strings.Contains(baseName, ".backup") && baseName != "vc.db" {
if !strings.Contains(baseName, ".backup") {
validDBs = append(validDBs, match)
}
}