Skip to content

Commit 1d7d4b9

Browse files
authored
bump-versions adds regen case conversion and includes Godot, regression tests (#5143)
# Description of Changes This addresses issue #5121 by updating the `bump-versions` cargo command to include: * Regenerating case conversion test bindings to update embedded CLI version * Updating the version in the Godot SDK's `.csproj` * Updating the version in the 2 republishing tests in C# regression tests' `.csproj` # API and ABI breaking changes No API or ABI changes # Expected complexity level and risk 1 - Small and strait forward # Testing - [X] Ran `cargo bump-versions --all 2.3.0-test --accept-snapshots` locally from the root of the repo, and confirmed that ~25 files being modified. * 22 where related to the version bump. * 3 files in the case-conversion-test-client typescript module bindings where updated as part of the regenerating steps.
1 parent 943ec8a commit 1d7d4b9

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

tools/upgrade-version/src/main.rs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,34 @@ fn main() -> anyhow::Result<()> {
238238
.run()
239239
.expect("pnpm generate failed!");
240240

241+
// Regenerate case conversion test bindings to update embedded CLI version
242+
println!("$> cargo run -p gen-bindings -- --out-dir crates/bindings-typescript/case-conversion-test-client/src/module_bindings --module-path modules/sdk-test-case-conversion");
243+
cmd!(
244+
"cargo",
245+
"run",
246+
"-p",
247+
"gen-bindings",
248+
"--",
249+
"--out-dir",
250+
"crates/bindings-typescript/case-conversion-test-client/src/module_bindings",
251+
"--module-path",
252+
"modules/sdk-test-case-conversion"
253+
)
254+
.run()
255+
.expect("gen-bindings for case-conversion-test-client failed!");
256+
println!("$> pnpm --dir crates/bindings-typescript/case-conversion-test-client exec prettier --write src/module_bindings");
257+
cmd!(
258+
"pnpm",
259+
"--dir",
260+
"crates/bindings-typescript/case-conversion-test-client",
261+
"exec",
262+
"prettier",
263+
"--write",
264+
"src/module_bindings"
265+
)
266+
.run()
267+
.expect("prettier for case-conversion-test-client failed!");
268+
241269
if matches.get_flag("accept-snapshots") {
242270
// Generate and auto-accept snapshots
243271
println!("$> INSTA_UPDATE=always cargo test -p spacetimedb-codegen --test codegen");
@@ -333,6 +361,14 @@ fn main() -> anyhow::Result<()> {
333361
// Update SpacetimeDB.BSATN.Runtime dependency to major.minor.*
334362
rewrite_csproj_package_ref_version(client_sdk, "SpacetimeDB.BSATN.Runtime", &wildcard_patch)?;
335363

364+
// Also update the Godot client SDK csproj
365+
let godot_client_sdk = "sdks/csharp/SpacetimeDB.ClientSDK.Godot.csproj";
366+
rewrite_xml_tag_value(godot_client_sdk, "Version", &full_version)?;
367+
// <AssemblyVersion> doesn't support prerelease or metadata version suffixes like <Version> does.
368+
rewrite_xml_tag_value(godot_client_sdk, "AssemblyVersion", &numeric_version)?;
369+
// Update SpacetimeDB.BSATN.Runtime dependency to major.minor.*
370+
rewrite_csproj_package_ref_version(godot_client_sdk, "SpacetimeDB.BSATN.Runtime", &wildcard_patch)?;
371+
336372
// Also bump the C# SDK package.json version (preserve formatting)
337373
rewrite_json_version_inplace("sdks/csharp/package.json", &full_version)?;
338374

@@ -341,6 +377,8 @@ fn main() -> anyhow::Result<()> {
341377
"demo/Blackholio/server-csharp/StdbModule.csproj",
342378
"templates/chat-console-cs/spacetimedb/StdbModule.csproj",
343379
"sdks/csharp/examples~/regression-tests/server/StdbModule.csproj",
380+
"sdks/csharp/examples~/regression-tests/republishing/server-initial/StdbModule.csproj",
381+
"sdks/csharp/examples~/regression-tests/republishing/server-republish/StdbModule.csproj",
344382
];
345383
for path in stdb_modules {
346384
rewrite_csproj_package_ref_version(path, "SpacetimeDB.Runtime", &wildcard_patch)?;

0 commit comments

Comments
 (0)