chore: bump version to 0.43.0 (bd-lejq)
- Update Version in cmd/bd/version.go: 0.42.0 → 0.43.0 - Update CHANGELOG.md with 0.43.0 section - Fix test isolation in TestTrackBdVersion_NoBeadsDir 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
var (
|
||||
// Version is the current version of bd (overridden by ldflags at build time)
|
||||
Version = "0.42.0"
|
||||
Version = "0.43.0"
|
||||
// Build can be set via ldflags at compile time
|
||||
Build = "dev"
|
||||
// Commit and branch the git revision the binary was built from (optional ldflag)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/steveyegge/beads/internal/git"
|
||||
"github.com/steveyegge/beads/internal/storage/sqlite"
|
||||
)
|
||||
|
||||
@@ -96,6 +97,9 @@ func TestGetVersionsSinceOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTrackBdVersion_NoBeadsDir(t *testing.T) {
|
||||
// Reset global state for test isolation
|
||||
ensureCleanGlobalState(t)
|
||||
|
||||
// Save original state
|
||||
origUpgradeDetected := versionUpgradeDetected
|
||||
origPreviousVersion := previousVersion
|
||||
@@ -104,10 +108,21 @@ func TestTrackBdVersion_NoBeadsDir(t *testing.T) {
|
||||
previousVersion = origPreviousVersion
|
||||
}()
|
||||
|
||||
// Reset state to ensure clean starting point
|
||||
versionUpgradeDetected = false
|
||||
previousVersion = ""
|
||||
|
||||
// Change to temp directory with no .beads
|
||||
tmpDir := t.TempDir()
|
||||
t.Chdir(tmpDir)
|
||||
|
||||
// Reset git caches so IsWorktree() returns fresh results for the temp dir
|
||||
git.ResetCaches()
|
||||
|
||||
// Set BEADS_DIR to temp directory to prevent FindBeadsDir from walking up
|
||||
// or finding the worktree's main repository .beads directory
|
||||
t.Setenv("BEADS_DIR", tmpDir)
|
||||
|
||||
// trackBdVersion should silently succeed
|
||||
trackBdVersion()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user