Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,11 @@ func CivoAPIClient() (*civogo.Client, error) {
return nil, err
}

var version string
res, skip := common.VersionCheck(common.GithubClient())
if !skip {
version = *res.TagName
} else {
version = "0.0.0"
}

// Update the user agent to include the version of the CLI
cliComponent := &civogo.Component{
// Set the user agent to the running CLI version (injected at build time via ldflags)
cliClient.SetUserAgent(&civogo.Component{
Name: "civo-cli",
Version: version,
}
cliClient.SetUserAgent(cliComponent)
Version: common.VersionCli,
})

return cliClient, nil
}
Expand Down
Loading