Skip to content

Commit

Permalink
parse floats safely in eks groovy job
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Aug 23, 2023
1 parent fbcfde5 commit 033cf41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobs/build-snaps/build-release-eks-snaps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def _find_eks_base(version, override){
return override

// assumes the version looks like r'v\d.\d+.\d+'
def f_version = Float.parseFloat(version.substring(1, version.lastIndexOf('.')))
Float f_version = version.substring(1, version.lastIndexOf('.'))
return f_version >= 1.99 ? "core22" : "core20";
}
def eks_base_override = params.eks_base_override
Expand Down

0 comments on commit 033cf41

Please sign in to comment.