build: Change publish_data_stream.py to publish the sln

We were publishing individual projects as a workaround for the
dependency issue (bug) that caused some projects to incorrectly target
net8.0. The fact that publishing individual projects "just worked" was
probably dumb luck. Now that the underlying issue has been addressed, we
can resume publishing the sln as a whole.
This commit is contained in:
John Colvin committed 2024-09-18 14:02:37 +00:00
1 parent dd305b9c3f
commit ffa92ea4ae
1 file changed
+7 -11
+7 -11
View File
@@ -146,15 +146,14 @@ def publish(args: PublishArgs):
return
subprocess.run(cmd, shell=True).check_returncode()
def dotnet_cmd(project, action='build'):
csproj = SparkPaths.root().joinpath(
def dotnet_cmd(action='build'):
sln = SparkPaths.root().joinpath(
'src',
'DataStreamSuite',
project,
f'{project}.csproj',
'DataStreamSuite.sln',
)
return ' '.join([
f'dotnet {action} {csproj}',
f'dotnet {action} {sln}',
f'--configuration {args.configuration.title()}',
f'--verbosity {_dotnet_verbosity(args.verbosity)}',
])
@@ -179,16 +178,13 @@ def publish(args: PublishArgs):
f'--build',
f'--preset {_cmake_build_preset(args.configuration.lower())}',
])
dotnet_projects = ["PubSubServer", "DataStreamPublisher", "SharedStreams", "Bts.DataStreamWebApp.Server"]
if args.clean:
run(f'{cmake_build_cmd} --target clean')
for p in dotnet_projects:
run(dotnet_cmd(p, 'clean'))
run(dotnet_cmd('clean'))
run(cmake_configure_cmd)
run(cmake_build_cmd)
for p in dotnet_projects:
publish_cmd = f'{dotnet_cmd(p, "publish")} -f {args.framework} -r {args.runtime} --sc'
run(publish_cmd)
publish_cmd = f'{dotnet_cmd("publish")} -f {args.framework} -r {args.runtime} --sc'
run(publish_cmd)
if args.output:
run(f'mv {publish_dir} {args.output}')