mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 06:28:11 +00:00
Merge pull request #4009 from Infisical/misc/update-cli-latest-version-check
misc: update CLI latest version check
This commit is contained in:
@@ -20,7 +20,7 @@ func CheckForUpdate() {
|
|||||||
if checkEnv := os.Getenv("INFISICAL_DISABLE_UPDATE_CHECK"); checkEnv != "" {
|
if checkEnv := os.Getenv("INFISICAL_DISABLE_UPDATE_CHECK"); checkEnv != "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
latestVersion, _, err := getLatestTag("Infisical", "infisical")
|
latestVersion, _, err := getLatestTag("Infisical", "cli")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debug().Err(err)
|
log.Debug().Err(err)
|
||||||
// do nothing and continue
|
// do nothing and continue
|
||||||
@@ -98,7 +98,7 @@ func getLatestTag(repoOwner string, repoName string) (string, string, error) {
|
|||||||
return "", "", fmt.Errorf("failed to unmarshal github response: %w", err)
|
return "", "", fmt.Errorf("failed to unmarshal github response: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
tag_prefix := "infisical-cli/v"
|
tag_prefix := "v"
|
||||||
|
|
||||||
// Extract the version from the first valid tag
|
// Extract the version from the first valid tag
|
||||||
version := strings.TrimPrefix(releaseDetails.TagName, tag_prefix)
|
version := strings.TrimPrefix(releaseDetails.TagName, tag_prefix)
|
||||||
|
|||||||
Reference in New Issue
Block a user