Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 6ccd4c3

Browse files
author
Савелій Савёнак
committed
Update publish.py
1 parent d62929a commit 6ccd4c3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

publish.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
pattern = "alpha"
66
filename = "SpectruMineAPI.csproj"
77
file = xml.etree.ElementTree.parse(filename)
8+
publishdir = "./bin/Publish"
9+
10+
811
version = file.getroot().find("PropertyGroup").find("Version")
912
print("Generating version")
1013
print("Pattern: maj.min.[DAY].[MOUTH][LASTHOUR][MINUTES]")
@@ -33,7 +36,7 @@
3336
file.write(filename)
3437
print("[DONE]")
3538
async def Proc():
36-
print("Publishing at /bin/Publish... Please wait...")
39+
print("Publishing at " + publishdir + "... Please wait...")
3740
time1 = time.time()
3841
proc = await asyncio.create_subprocess_shell(
3942
"dotnet build --configuration Release",
@@ -46,12 +49,12 @@ async def Proc():
4649
if stderr:
4750
print(f'\n{stderr.decode()}')
4851
elapsed = str(round(time.time() - time1, 2))
49-
if proc.returncode is not 0:
52+
if proc.returncode != 0:
5053
print("Build failed at " + elapsed + "s. returning...")
5154
return
5255
print("Build Successful at " + elapsed + "s. Publishing...")
5356
proc1 = await asyncio.create_subprocess_shell(
54-
"dotnet publish -c Release -r ubuntu.22.04-x64 --output ./bin/Publish",
57+
"dotnet publish -c Release -r ubuntu.22.04-x64 --output " + publishdir,
5558
stdout=asyncio.subprocess.PIPE,
5659
stderr=asyncio.subprocess.PIPE)
5760
stdout, stderr = await proc1.communicate()

0 commit comments

Comments
 (0)