All checks were successful
PR Check / check-and-test (pull_request) Successful in 11s
- Enhanced .goreleaser.yaml for improved build configuration, including static linking and ARM64 support. - Updated logging in root.go to include version date during startup. - Modified version.go to initialize and expose the build date alongside the version. - Adjusted version command output to display both version and date for better clarity.
25 lines
548 B
Go
25 lines
548 B
Go
// cmd/version.go
|
|
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"s1d3sw1ped/SteamCache2/version"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// versionCmd represents the version command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "prints the version of SteamCache2",
|
|
Long: `Prints the version of SteamCache2. This command is useful for checking the version of the application.`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Fprintln(os.Stderr, "SteamCache2", version.Version, version.Date)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|