Skip to content

Commit 807349f

Browse files
committed
chore: remove policy from version bundle
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
1 parent bd1525a commit 807349f

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

pkg/version/version.go

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ func versionFromBuildInfo(info *debug.BuildInfo, fallbackCommit string) (string,
7777
}
7878

7979
type VersionBundle struct {
80-
OCM string `json:"ocm"`
81-
PolicyAddon string `json:"policy_addon"`
80+
OCM string `json:"ocm"`
8281
}
8382

8483
var defaultBundleVersion = "1.3.1"
@@ -113,45 +112,37 @@ func getVersionBundle(version string) (VersionBundle, error) {
113112

114113
// latest
115114
versionBundleList["latest"] = VersionBundle{
116-
OCM: "latest",
117-
PolicyAddon: "latest",
115+
OCM: "latest",
118116
}
119117

120118
// predefined bundle version
121119
// TODO: automated version tracking
122120
versionBundleList["1.1.0"] = VersionBundle{
123-
OCM: "v1.1.0",
124-
PolicyAddon: "v0.16.0",
121+
OCM: "v1.1.0",
125122
}
126123

127124
versionBundleList["1.1.1"] = VersionBundle{
128-
OCM: "v1.1.1",
129-
PolicyAddon: "v0.17.0",
125+
OCM: "v1.1.1",
130126
}
131127

132128
versionBundleList["1.1.3"] = VersionBundle{
133-
OCM: "v1.1.3",
134-
PolicyAddon: "v0.17.0",
129+
OCM: "v1.1.3",
135130
}
136131

137132
versionBundleList["1.2.0"] = VersionBundle{
138-
OCM: "v1.2.0",
139-
PolicyAddon: "v0.18.0",
133+
OCM: "v1.2.0",
140134
}
141135

142136
versionBundleList["1.2.1"] = VersionBundle{
143-
OCM: "v1.2.1",
144-
PolicyAddon: "v0.18.0",
137+
OCM: "v1.2.1",
145138
}
146139

147140
versionBundleList["1.3.0"] = VersionBundle{
148-
OCM: "v1.3.0",
149-
PolicyAddon: "v0.18.0",
141+
OCM: "v1.3.0",
150142
}
151143

152144
versionBundleList["1.3.1"] = VersionBundle{
153-
OCM: "v1.3.1",
154-
PolicyAddon: "v0.18.0",
145+
OCM: "v1.3.1",
155146
}
156147

157148
// default

pkg/version/version_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ func TestVersionFromBuildInfo(t *testing.T) {
121121

122122
func TestGetVersionBundle(t *testing.T) {
123123
expectedVersionBundle := VersionBundle{
124-
OCM: "v1.3.1",
125-
PolicyAddon: "v0.18.0",
124+
OCM: "v1.3.1",
126125
}
127126

128127
tests := []struct {

0 commit comments

Comments
 (0)