Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.21 KB

File metadata and controls

41 lines (25 loc) · 1.21 KB

@google-github-actions/setup-cloud-sdk


@google-github-actions/setup-cloud-sdk / index / computeGcloudVersion

Function: computeGcloudVersion()

computeGcloudVersion(version?): Promise<string>

Defined in: index.ts:226

computeGcloudVersion computes the appropriate gcloud version for the given string. If the string is the empty string or the special value "latest", it returns the latest known version of the Google Cloud SDK. Otherwise it returns the provided string. It does not validate that the string is a valid version.

This is most useful when accepting user input which should default to "latest" or the empty string when you want the latest version to be installed, but still want users to be able to choose a specific version to install as a customization.

Parameters

version?

string

String (or undefined) version. The empty string or other falsey values will return the latest gcloud version.

Returns

Promise<string>

String representing the latest version.

Deprecated

Callers should use installGcloudSDK('> 0.0.0.') instead.