Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 23e554b

Browse files
authored
Merge pull request #2668 from jcvenegas/bump-1.11.0
release: Kata Containers 1.11.0
2 parents da48b98 + c7fa5dc commit 23e554b

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.0-rc0
1+
1.11.0

cli/kata-check_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,13 @@ func TestCheckVersionConsistencyInComponents(t *testing.T) {
959959
"",
960960
"0.2.0-rc0",
961961
},
962+
{
963+
false,
964+
false,
965+
"kata-shim version 0.2.0-xxxxxxxxxxxxx",
966+
"",
967+
"0.2.0",
968+
},
962969
}
963970

964971
origVersion := version

cli/utils.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,13 @@ func constructVersionInfo(version string) VersionInfo {
161161
return unknownVersionInfo
162162
}
163163

164-
pres := strings.Split(sv.Pre[0].VersionStr, "-")
164+
var pres string
165+
if len(sv.Pre) > 0 {
166+
presSplit := strings.Split(sv.Pre[0].VersionStr, "-")
167+
if len(presSplit) > 2 {
168+
pres = presSplit[1]
169+
}
170+
}
165171

166172
// version contains Commit info.
167173
if len(pres) > 1 {
@@ -170,7 +176,7 @@ func constructVersionInfo(version string) VersionInfo {
170176
Major: sv.Major,
171177
Minor: sv.Minor,
172178
Patch: sv.Patch,
173-
Commit: pres[1],
179+
Commit: pres,
174180
}
175181
}
176182

0 commit comments

Comments
 (0)