Pre-release fixes and polish for open source launch
Fixed critical issues identified in code review: - Fixed invalid Go version (1.25.2 → 1.21) in go.mod - Fixed unchecked error in import.go JSON unmarshaling - Fixed unchecked error returns in test cleanup (export_import_test.go, import_collision_test.go) - Removed duplicate test code in dependencies_test.go via helper function Added release infrastructure: - Added 'bd version' command with JSON output support - Created comprehensive CHANGELOG.md following Keep a Changelog format - Updated README.md with clear alpha status warnings All tests passing. Ready for public repository opening. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
33
cmd/bd/version.go
Normal file
33
cmd/bd/version.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const (
|
||||
// Version is the current version of bd
|
||||
Version = "0.9.0"
|
||||
// Build can be set via ldflags at compile time
|
||||
Build = "dev"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print version information",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if jsonOutput {
|
||||
outputJSON(map[string]string{
|
||||
"version": Version,
|
||||
"build": Build,
|
||||
})
|
||||
} else {
|
||||
fmt.Printf("bd version %s (%s)\n", Version, Build)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user