From 5550166d03db5c2b8a1ec84cd39c8b46b4a15023 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 25 Jul 2024 18:42:07 +0000 Subject: [PATCH] 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. --- tools/py/publish_data_stream.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tools/py/publish_data_stream.py b/tools/py/publish_data_stream.py index 8b5907919..00fa81e3a 100644 --- a/tools/py/publish_data_stream.py +++ b/tools/py/publish_data_stream.py @@ -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"] 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}')