diff --git a/eris/tools.py b/eris/tools.py index 6a0cf42..e4344ec 100644 --- a/eris/tools.py +++ b/eris/tools.py @@ -457,8 +457,8 @@ def pil(path): return Status.normal, result -@deps(deps={"golang-golang-x-tools"}, url="golang-golang-x-tools", - executables={"godoc"}) +@deps(deps={"go/github.com/golang/go/src/cmd/godoc" }, + url="https://github.com/golang/go", executables={"godoc"}) def godoc(path): with tempfile.TemporaryDirectory() as temp_dir: symlink_path = os.path.join(temp_dir, "file.go") diff --git a/eris/tools.toml b/eris/tools.toml index cfca9db..0b5de8c 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -229,11 +229,13 @@ tools_for_extensions = [ command = "luacheck" [go_vet] - dependencies = ["golang-go", "go/github.com/golang/go/src/cmd/vet"] - command = "go vet" + dependencies = ["go/github.com/golang/go/src/cmd/vet"] + url = "https://github.com/golang/go" + command = "vet" [golint] - dependencies = ["golint", "go/github.com/golang/lint/golint"] + dependencies = ["go/github.com/golang/lint/golint"] + url = "https://github.com/golang/lint" command = "golint -set_exit_status" [yamllint] diff --git a/install-tools b/install-tools index 8f466c8..a2a7829 100755 --- a/install-tools +++ b/install-tools @@ -8,11 +8,12 @@ import subprocess import eris.tools -pip_deps, dist_deps = set(), set() +pip_deps, go_deps, dist_deps = set(), set(), set() +dep_types = {"pip": pip_deps, "go": go_deps} for dependency in eris.tools.dependencies(): if "/" in dependency: - pip_version, pip_dependency = dependency.split("/") - pip_deps.add(pip_dependency) + dep_type, dep = dependency.split("/", maxsplit=1) + dep_types[dep_type].add(dep) else: dist_deps.add(dependency) if dist_deps: @@ -21,3 +22,7 @@ if dist_deps: if pip_deps: subprocess.run(["python" + eris.tools.PYTHON_VERSION, "-m", "pip", "install"] + list(pip_deps), check=True) +if go_deps: + subprocess.run(["sudo", "apt-get", "-y", "install", "golang-go"], + check=True) + subprocess.run(["go", "get", "-u"] + list(go_deps), check=True)