()
| 184 | } |
| 185 | |
| 186 | pub fn regen_dlls() -> Result<()> { |
| 187 | let workspace = workspace_dir(); |
| 188 | let sdk = sdk_dir(); |
| 189 | |
| 190 | cmd!( |
| 191 | "dotnet", |
| 192 | "pack", |
| 193 | workspace.join("crates/bindings-csharp/BSATN.Runtime"), |
| 194 | "-c", |
| 195 | "Release" |
| 196 | ) |
| 197 | .run()?; |
| 198 | cmd!( |
| 199 | "dotnet", |
| 200 | "pack", |
| 201 | workspace.join("crates/bindings-csharp/Runtime"), |
| 202 | "-c", |
| 203 | "Release" |
| 204 | ) |
| 205 | .run()?; |
| 206 | |
| 207 | let nuget_config_dir = tempfile::tempdir()?; |
| 208 | let nuget_config_path = nuget_config_dir.path().join("nuget.config"); |
| 209 | fs::write( |
| 210 | &nuget_config_path, |
| 211 | render_nuget_config( |
| 212 | &workspace.join("crates/bindings-csharp/BSATN.Runtime/bin/Release"), |
| 213 | &workspace.join("crates/bindings-csharp/Runtime/bin/Release"), |
| 214 | ), |
| 215 | )?; |
| 216 | |
| 217 | clear_restored_package_dirs(BSATN_PACKAGE_ID)?; |
| 218 | clear_restored_package_dirs(RUNTIME_PACKAGE_ID)?; |
| 219 | |
| 220 | // Some Unity runners have had partially restored GodotSharp package state in the past. |
| 221 | // Godot restores packages under obj~/godot/packages, so clearing obj~/godot removes |
| 222 | // both intermediates and Godot-only packages without touching Unity-visible packages. |
| 223 | // This prevents NuGet from reusing assets missing GodotSharp.dll. |
| 224 | // See https://github.com/clockworklabs/SpacetimeDB/pull/5133 for more details. |
| 225 | clear_godot_regen_dir()?; |
| 226 | |
| 227 | cmd!( |
| 228 | "dotnet", |
| 229 | "restore", |
| 230 | "SpacetimeDB.ClientSDK.csproj", |
| 231 | "--configfile", |
| 232 | path_arg(&nuget_config_path), |
| 233 | ) |
| 234 | .dir(&sdk) |
| 235 | .run()?; |
| 236 | |
| 237 | cmd!( |
| 238 | "dotnet", |
| 239 | "restore", |
| 240 | "SpacetimeDB.ClientSDK.Godot.csproj", |
| 241 | "--configfile", |
| 242 | path_arg(&nuget_config_path), |
| 243 | // TODO: It should be possible to put this in Directory.Build.props, but it caused CI failures when we did. |
no test coverage detected
searching dependent graphs…