mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
15 lines
366 B
Python
15 lines
366 B
Python
import subprocess
|
|
import os
|
|
import shutil
|
|
|
|
if os.path.exists("build"):
|
|
shutil.rmtree("build")
|
|
os.mkdir("build")
|
|
|
|
subprocess.run(["go", "build", "-o", "build/", "main.go"])
|
|
|
|
os.chdir("./frontend")
|
|
subprocess.run(["npm", "install"], shell=True)
|
|
subprocess.run(["npm", "run", "build"], shell=True)
|
|
os.chdir("..")
|
|
shutil.copytree("./frontend/dist", "./build/static") |