Skip to content

Commit 5386835

Browse files
committed
update build.py
1 parent 77b8245 commit 5386835

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@ def build(tag, system, arch):
3434
env.update({"GOOS": system, "GOARCH": arch, "CGO_ENABLED": "0"})
3535
output = target_dir / "gvm.exe" if system == System.WINDOWS else target_dir / "gvm"
3636

37+
cwd = current_dir / "gvm" / "cmd"
3738
cmd = [
3839
"go",
3940
"build",
40-
"-C",
41-
r"gvm\cmd",
4241
f'-ldflags=-w -s -X gvm.VERSION={tag}',
4342
"-o",
44-
output,
43+
str(output),
4544
]
46-
subprocess.run(cmd, shell=True, env=env)
45+
subprocess.run(cmd, env=env, cwd=cwd)
4746

4847
shutil.make_archive(str(target_dir.parent), "zip", target_dir.parent)
4948
shutil.rmtree(target_dir.parent)

0 commit comments

Comments
 (0)