Skip to content

Commit

Permalink
Add delete list for revendor.py
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Dec 14, 2018
1 parent 3c3ef9d commit 115d3bc
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion hack/revendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,19 @@ def check_antipackage():
},
{
"package": "github.com/appscode/osm",
"version": "0.9.0"
"version": "0.9.1"
},
{
"package": "github.com/kubepack/onessl",
"version": "0.9.0"
}
]
DELETE_LIST=[
"github.com/openshift/api",
"github.com/openshift/client-go",
"github.com/openshift/origin",
"github.com/appscode/ocutil"
]


def die(status):
Expand Down Expand Up @@ -277,6 +283,10 @@ def git_requires_commit(cwd=libbuild.REPO_ROOT):
return Counter(changed_files) != Counter(['glide.lock'])


def sortDep(val):
return val['package']


def glide_mod(glide_config, changes):
for dep in glide_config['import']:
if dep['package'] in changes:
Expand All @@ -295,6 +305,12 @@ def glide_mod(glide_config, changes):
if dep['package'] == x['package']:
glide_config['import'][idx] = x
break
for package in DELETE_LIST:
for idx, dep in enumerate(glide_config['import']):
if dep['package'] == package:
del glide_config['import'][idx]
break
glide_config['import'].sort(key=sortDep)


def glide_write(f, glide_config):
Expand Down

0 comments on commit 115d3bc

Please sign in to comment.