diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eb3d610..5dbfbb85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,18 @@ The format is based on [Keep a Changelog][], and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ -[Unreleased]: https://github.com/yourbase/yb/compare/v0.5.7...HEAD +[Unreleased]: https://github.com/yourbase/yb/compare/v0.5.8...HEAD + +## [0.5.8][] - 2021-03-08 + +Version 0.5.8 backports a change to the build environment keychain name. + +[0.5.8]: https://github.com/yourbase/yb/releases/tag/v0.5.8 + +### Changed + +- On macOS, the empty, default keychain that yb creates will now be called + `login` instead of `yb` for compatibility with more programs. ## [0.5.7][] - 2021-03-01 diff --git a/cmd/yb/keychain.go b/cmd/yb/keychain.go index 122e0938..2a545f9d 100644 --- a/cmd/yb/keychain.go +++ b/cmd/yb/keychain.go @@ -78,7 +78,7 @@ func ensureKeychain(ctx context.Context, bio biome.Biome) error { keychainList := parseKeychainOutput(stdout.String()) // Create a passwordless keychain. - const keychainName = "yb.keychain" + const keychainName = "login.keychain" if err := runCommand(ctx, bio, "security", "create-keychain", "-p", "", keychainName); err != nil { return fmt.Errorf("ensure build environment keychain: %w", err) } diff --git a/cmd/yb/keychain_test.go b/cmd/yb/keychain_test.go index 0dd5b27a..a60e4e7a 100644 --- a/cmd/yb/keychain_test.go +++ b/cmd/yb/keychain_test.go @@ -18,6 +18,7 @@ package main import ( "context" + "path/filepath" "strings" "testing" @@ -72,8 +73,13 @@ func TestEnsureKeychain(t *testing.T) { if err != nil { t.Error("security default-keychain:", err) } - if len(parseKeychainOutput(stdout.String())) == 0 { + if keychains := parseKeychainOutput(stdout.String()); len(keychains) == 0 { t.Error("No default keychain set") + } else if got, want := keychains[0], "login.keychain-db"; filepath.Base(got) != want { + // Many tools depend on the default keychain name being "login", so turn the + // implicit interface into an explicit test. + // See https://app.clubhouse.io/yourbaseio/story/4145 for more details. + t.Errorf("default keychain = %q; want name to be %q", got, want) } // Verify that running multiple times does not return an error and does not