diff --git a/hack/revendor.py b/hack/revendor.py index 05c333bf4..569bfdc65 100755 --- a/hack/revendor.py +++ b/hack/revendor.py @@ -223,7 +223,7 @@ def check_antipackage(): }, { "package": "cloud.google.com/go", - "version": "v0.2.0" + "version": "v0.23.0" }, { "package": "github.com/spf13/afero", @@ -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): @@ -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: @@ -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): @@ -334,7 +350,7 @@ def revendor_repo(self, repo_name): call('glide slow', cwd=repo) if git_requires_commit(cwd=repo): call('git add --all', cwd=repo) - call('git commit -s -a -m "Revendor api"', cwd=repo, eoe=False) + call('git commit -s -a -m "Revendor dependencies"', cwd=repo, eoe=False) call('git push origin {0}'.format(revendor_branch), cwd=repo) else: call('git reset HEAD --hard', cwd=repo)