Updated scripts and registered tasks.
reset_db.py now has the updated path. Added reset database to tasks. watch_all.py has improved output.
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
import shutil
|
||||
|
||||
|
||||
SERVER_DIR = "src/MultiShop/Server"
|
||||
SERVER_DIR = "server"
|
||||
DATA_DIR = "Data"
|
||||
DB_MIGRATE_CMD = "dotnet ef migrations add InitialCreate -o {0}"
|
||||
DB_UPDATE_CMD = "dotnet ef database update"
|
||||
|
@@ -10,12 +10,12 @@ async def exec(cmd, path, silent=False):
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
os.chdir(os.pardir)
|
||||
os.chdir(path)
|
||||
print("Executing \"{0}\" in \"{1}\".".format(cmd, path))
|
||||
proc = None
|
||||
if (not silent):
|
||||
print("Executing \"{0}\" in \"{1}\".".format(cmd, path))
|
||||
proc = await asyncio.create_subprocess_shell(cmd)
|
||||
else:
|
||||
print("Executing in silent mode.")
|
||||
print("Executing \"{0}\" in \"{1}\" silently.".format(cmd, path))
|
||||
proc = await asyncio.create_subprocess_shell(cmd, stdout=devnull)
|
||||
|
||||
await proc.wait()
|
||||
|
Reference in New Issue
Block a user