mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-22 02:47:26 +08:00
* initial auto-update * working link, update, and testing docker container and scripts * refactor packages/folders * move files to proper folders * fix typos Closes #421 * optimize rpm imports * optimize channel imports * Refactor split command to allow testing of split operations Closes #338 * modify split and test for folder changes * remove alias * fix docker warning about FROM and AS being in different letter case Closes #422 * QClient Account Command * Display transaction details and confirmation prompts for transfer and merge commands * build qclient docker improvements * update build args for mpfr.so.6 * update install and node commands * remove NodeConfig check for qclient node commands * udpate * working node commands * update commands * move utils and rename package --------- Co-authored-by: Vasyl Tretiakov <vasyl.tretiakov@gmail.com> Co-authored-by: littleblackcloud <163544315+littleblackcloud@users.noreply.github.com> Co-authored-by: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com>
47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
package node
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
"source.quilibrium.com/quilibrium/monorepo/client/utils"
|
|
)
|
|
|
|
// infoCmd represents the info command
|
|
var infoCmd = &cobra.Command{
|
|
Use: "info",
|
|
Short: "Get information about the Quilibrium node",
|
|
Long: `Get information about the Quilibrium node.
|
|
Available subcommands:
|
|
latest-version Get the latest available version of Quilibrium node
|
|
|
|
Examples:
|
|
# Get the latest version
|
|
qclient node info latest-version`,
|
|
}
|
|
|
|
// latestVersionCmd represents the latest-version command
|
|
var latestVersionCmd = &cobra.Command{
|
|
Use: "latest-version",
|
|
Short: "Get the latest available version of Quilibrium node",
|
|
Long: `Get the latest available version of Quilibrium node by querying the releases API.
|
|
This command fetches the version information from https://releases.quilibrium.com/release.`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
version, err := utils.GetLatestVersion(utils.ReleaseTypeNode)
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
return
|
|
}
|
|
fmt.Fprintf(os.Stdout, "Latest available version: %s\n", version)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
// Add the latest-version subcommand to the info command
|
|
infoCmd.AddCommand(latestVersionCmd)
|
|
|
|
// Add the info command to the node command
|
|
NodeCmd.AddCommand(infoCmd)
|
|
}
|