477
// parseTemporalVersion extracts the version from output like
478
// "temporal version 1.29.0" or "temporal version 0.0.0-DEV (Server 1.30.1, UI 2.45.3)"
480
>
s := strings.TrimSpace(output)
481
>
re := regexp.MustCompile(`^temporal version\s+(\d+\.\d+\.\d+\S*)`)
482
>
matches := re.FindStringSubmatch(s)
483
>
if len(matches) < 2 {
484
return "", fmt.Errorf("failed to parse version from output: %s", s)
485
}
487
}
488