From e0a6b3dbbf7e277c34c390edda5d0f1ac8eff3c8 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Tue, 11 Nov 2025 09:16:35 -0500 Subject: [PATCH 1/3] Bump without regeneration --- Justfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 6ba562538fba..ce16e0a622b4 100644 --- a/Justfile +++ b/Justfile @@ -300,10 +300,13 @@ prepare-release version: # see --workspace flag https://doc.rust-lang.org/cargo/commands/cargo-update.html # used to update Cargo.lock after we've bumped versions in Cargo.toml @cargo update --workspace - @just generate-openapi + @just set-openapi-version {{ version }} @git add Cargo.toml Cargo.lock ui/desktop/package.json ui/desktop/package-lock.json ui/desktop/openapi.json @git commit --message "chore(release): release version {{ version }}" +set-openapi-version version: + @jq '.info.version |= "{{ version }}"' ui/desktop/openapi.json > ui/desktop/openapi.json.tmp && mv ui/desktop/openapi.json.tmp ui/desktop/openapi.json + # extract version from Cargo.toml get-tag-version: @uvx --from=toml-cli toml get --toml-path=Cargo.toml "workspace.package.version" From 99c07439b3b0c186bac2823c4137915c5bf77333 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Tue, 11 Nov 2025 09:34:04 -0500 Subject: [PATCH 2/3] Diff no whitespace --- scripts/check-openapi-schema.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-openapi-schema.sh b/scripts/check-openapi-schema.sh index cbf07ac83182..d45f733f256c 100755 --- a/scripts/check-openapi-schema.sh +++ b/scripts/check-openapi-schema.sh @@ -8,7 +8,7 @@ echo "🔍 Checking OpenAPI schema is up-to-date..." # Check if the generated schema differs from the committed version echo "🔍 Comparing generated schema with committed version..." -if ! git diff --exit-code ui/desktop/openapi.json ui/desktop/src/api/; then +if ! git diff --ignore-space-change --exit-code ui/desktop/openapi.json ui/desktop/src/api/; then echo "" echo "❌ OpenAPI schema is out of date!" echo "" From ff99cba4beacbe515883e04f7f13030c975b6613 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Tue, 11 Nov 2025 09:34:26 -0500 Subject: [PATCH 3/3] Write with newline at EOF --- crates/goose-server/src/bin/generate_schema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/goose-server/src/bin/generate_schema.rs b/crates/goose-server/src/bin/generate_schema.rs index 8ddb867bef49..ec5bd33aad95 100644 --- a/crates/goose-server/src/bin/generate_schema.rs +++ b/crates/goose-server/src/bin/generate_schema.rs @@ -19,7 +19,7 @@ fn main() { fs::create_dir_all(parent).unwrap(); } - fs::write(&output_path, &schema).unwrap(); + fs::write(&output_path, format!("{schema}\n")).unwrap(); eprintln!( "Successfully generated OpenAPI schema at {}", output_path.canonicalize().unwrap().display()