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:
File diff suppressed because one or more lines are too long
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -26,6 +26,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.23'
|
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
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -9,28 +9,65 @@ before:
|
|||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- id: bd
|
- id: bd-linux-amd64
|
||||||
main: ./cmd/bd
|
main: ./cmd/bd
|
||||||
binary: bd
|
binary: bd
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=1
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
|
||||||
- windows
|
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
|
||||||
ignore:
|
|
||||||
- goos: linux
|
|
||||||
goarch: arm64
|
|
||||||
- goos: windows
|
|
||||||
goarch: arm64
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w
|
- -s -w
|
||||||
- -X main.Version={{.Version}}
|
- -X main.Version={{.Version}}
|
||||||
- -X main.Build={{.ShortCommit}}
|
- -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:
|
archives:
|
||||||
- id: bd-archive
|
- id: bd-archive
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
|
|||||||
@@ -147,11 +147,11 @@ func FindDatabasePath() string {
|
|||||||
// Look for any .db file in the beads directory
|
// Look for any .db file in the beads directory
|
||||||
matches, err := filepath.Glob(filepath.Join(absBeadsDir, "*.db"))
|
matches, err := filepath.Glob(filepath.Join(absBeadsDir, "*.db"))
|
||||||
if err == nil && len(matches) > 0 {
|
if err == nil && len(matches) > 0 {
|
||||||
// Filter out backup files and vc.db
|
// Filter out backup files only
|
||||||
var validDBs []string
|
var validDBs []string
|
||||||
for _, match := range matches {
|
for _, match := range matches {
|
||||||
baseName := filepath.Base(match)
|
baseName := filepath.Base(match)
|
||||||
if !strings.Contains(baseName, ".backup") && baseName != "vc.db" {
|
if !strings.Contains(baseName, ".backup") {
|
||||||
validDBs = append(validDBs, match)
|
validDBs = append(validDBs, match)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user