Reorganized folder structure.
This commit is contained in:
parent
4e12a4b7fc
commit
e43d1294c4
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "SimpleLogger"]
|
[submodule "SimpleLogger"]
|
||||||
path = SimpleLogger
|
path = Libraries/SimpleLogger
|
||||||
url = https://systems.reslate.xyz/git/ydeng/SimpleLogger.git
|
url = https://systems.reslate.xyz/git/ydeng/SimpleLogger.git
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Framework\MultiShop.Shop.Framework.csproj" />
|
<ProjectReference Include="..\Framework\MultiShop.Shop.Framework.csproj" />
|
||||||
<ProjectReference Include="..\..\SimpleLogger\SimpleLogger.csproj" />
|
<ProjectReference Include="..\..\..\Libraries\SimpleLogger\SimpleLogger.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Framework\MultiShop.Shop.Framework.csproj" />
|
<ProjectReference Include="..\Framework\MultiShop.Shop.Framework.csproj" />
|
||||||
<ProjectReference Include="..\..\SimpleLogger\SimpleLogger.csproj" />
|
<ProjectReference Include="..\..\..\Libraries\SimpleLogger\SimpleLogger.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\SimpleLogger\SimpleLogger.csproj" />
|
<ProjectReference Include="..\..\..\..\Libraries\SimpleLogger\SimpleLogger.csproj" />
|
||||||
<ProjectReference Include="..\..\..\MultiShop.Shop\AliExpressModule\MultiShop.Shop.AliExpressModule.csproj" />
|
<ProjectReference Include="..\..\..\MultiShop.Shop\AliExpressModule\MultiShop.Shop.AliExpressModule.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\MultiShop.Shop\BanggoodModule\MultiShop.Shop.BanggoodModule.csproj" />
|
<ProjectReference Include="..\..\..\MultiShop.Shop\BanggoodModule\MultiShop.Shop.BanggoodModule.csproj" />
|
||||||
<ProjectReference Include="..\..\..\SimpleLogger\SimpleLogger.csproj" />
|
<ProjectReference Include="..\..\..\..\Libraries\SimpleLogger\SimpleLogger.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -1,28 +0,0 @@
|
|||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
SERVER_DIR = "src/MultiShop/Server"
|
|
||||||
DATA_DIR = "Data"
|
|
||||||
DB_MIGRATE_CMD = "dotnet ef migrations add InitialCreate -o {0}"
|
|
||||||
DB_UPDATE_CMD = "dotnet ef database update"
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
os.chdir("..")
|
|
||||||
os.chdir(SERVER_DIR)
|
|
||||||
print("Working in: " + os.getcwd())
|
|
||||||
|
|
||||||
migrationsDir = os.path.join(DATA_DIR, "Migrations")
|
|
||||||
|
|
||||||
print("Deleting current migrations directory if it exists.")
|
|
||||||
shutil.rmtree(migrationsDir, ignore_errors=True)
|
|
||||||
|
|
||||||
print("Deleting old app.db if it exists.")
|
|
||||||
if os.path.exists("app.db"):
|
|
||||||
os.remove("app.db")
|
|
||||||
|
|
||||||
print("Creating migration.")
|
|
||||||
os.system(DB_MIGRATE_CMD.format(migrationsDir))
|
|
||||||
|
|
||||||
print("Updating database.")
|
|
||||||
os.system(DB_UPDATE_CMD)
|
|
@ -1,24 +0,0 @@
|
|||||||
import os
|
|
||||||
import asyncio
|
|
||||||
import sys
|
|
||||||
|
|
||||||
SERVER_CSPROJ_DIR = "src/MultiShop/Server"
|
|
||||||
ASSET_WATCH_DIR = "src/MultiShop/Client/assets"
|
|
||||||
|
|
||||||
|
|
||||||
async def exec(cmd, path):
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
os.chdir(os.pardir)
|
|
||||||
os.chdir(path)
|
|
||||||
proc = await asyncio.create_subprocess_shell(
|
|
||||||
cmd,
|
|
||||||
stdout=sys.stdout,
|
|
||||||
stderr=sys.stderr,
|
|
||||||
)
|
|
||||||
|
|
||||||
await proc.wait()
|
|
||||||
|
|
||||||
async def main():
|
|
||||||
await asyncio.gather(exec("dotnet watch run", SERVER_CSPROJ_DIR), exec("npm run watch", ASSET_WATCH_DIR))
|
|
||||||
|
|
||||||
asyncio.run(main())
|
|
Loading…
x
Reference in New Issue
Block a user