Skip to content

Commit b8dd147

Browse files
maigovannoncopybara-github
authored andcommitted
Update ReleaseCandidate constraints for Java.
PiperOrigin-RevId: 804400784 Change-Id: I2ec43a913f166dcd633763d76c5763785392b588
1 parent 9f0a797 commit b8dd147

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/runtime/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ func ResolveVersion(ctx *gcp.Context, runtime InstallableRuntime, verConstraint,
359359
// Some release candidates do not follow the convention for semver
360360
// Specifically php. example - 8.3.0RC4.
361361
if IsReleaseCandidate(verConstraint) || version.IsExactSemver(verConstraint) {
362+
ctx.Logf("Using exact version %s for %s", verConstraint, runtimeNames[runtime])
362363
return verConstraint, nil
363364
}
364365

pkg/version/version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ func IsExactSemver(constraint string) bool {
121121
// Example dotnet rc version - 8.0.100-rc.1
122122
// Example php rc version - 8.3.0RC4
123123
// Example ruby rc version - 3.2.0-rc1
124+
// Example java rc version - 25.0.0-beta+36.0.ea
124125
func IsReleaseCandidate(constraint string) bool {
125-
m := regexp.MustCompile(`(\d+)\.(\d+)\.(.*)(rc|RC)(.*)`)
126+
m := regexp.MustCompile(`(\d+)\.(\d+)\.(.*)(rc|RC|beta)(.*)`)
126127
return m.MatchString(constraint)
127128
}

0 commit comments

Comments
 (0)