Skip to content

Commit

Permalink
Automate updating dependency to kubernetes-1.11.3 (#287)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Sep 10, 2018
1 parent 0683d71 commit 8ccc1ea
Showing 1 changed file with 46 additions and 16 deletions.
62 changes: 46 additions & 16 deletions hack/revendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,48 @@ def check_antipackage():
REPO_LIST = DATABASES + ['cli', 'operator', 'apimachinery']
KUTIL_VERSION = 'release-8.0'
KUBEMON_VERSION = 'release-8.0'
FORCED_DEPS = {
'github.com/cpuguy83/go-md2man': 'v1.0.8',
'github.com/json-iterator/go': '1.1.5',
'github.com/coreos/prometheus-operator': 'v0.23.1',
}
FORCED_DEPS = [
{
'package': 'github.com/cpuguy83/go-md2man',
'version': 'v1.0.8',
},
{
'package': 'github.com/json-iterator/go',
'version': '1.1.5',
},
{
'package': 'github.com/coreos/prometheus-operator',
'version': 'v0.23.2',
},
{
"package": "k8s.io/api",
"version": "kubernetes-1.11.3"
},
{
"package": "k8s.io/apiextensions-apiserver",
"version": "kubernetes-1.11.3"
},
{
"package": "k8s.io/apimachinery",
"repo": "https://github.com/pharmer/apimachinery.git",
"vcs": "git",
"version": "release-1.11.3"
},
{
"package": "k8s.io/apiserver",
"repo": "https://github.com/pharmer/apiserver.git",
"vcs": "git",
"version": "release-1.11.3"
},
{
"package": "k8s.io/client-go",
"version": "kubernetes-1.11.3"
},
{
"package": "k8s.io/kube-openapi",
"version": "master"
},
]


def die(status):
Expand Down Expand Up @@ -92,18 +129,11 @@ def glide_mod(glide_config, changes):
for dep in glide_config['import']:
if dep['package'] in changes:
dep['version'] = changes[dep['package']]
for pkg, ver in FORCED_DEPS.iteritems():
found = False
for dep in glide_config['import']:
if dep['package'] == pkg:
dep['version'] = ver
found = True
for x in FORCED_DEPS:
for idx, dep in enumerate(glide_config['import']):
if dep['package'] == x['package']:
glide_config['import'][idx] = x
break
if not found:
glide_config['import'].append({
'package': pkg,
'version': ver,
})


def glide_write(f, glide_config):
Expand Down

0 comments on commit 8ccc1ea

Please sign in to comment.