diff --git a/tools/check-version-sync.sh b/tools/check-version-sync.sh index 79ee71eae..926202677 100755 --- a/tools/check-version-sync.sh +++ b/tools/check-version-sync.sh @@ -346,6 +346,11 @@ validate_package_versions() { validate_chrome_extension_manifest_version() { manifest=packages/op-chrome-extension/manifest.json + if [[ ! -f "$manifest" ]]; then + report_missing "$manifest" \ + 'Chrome extension manifest is missing; it must exist and carry the Cargo workspace version' + return + fi manifest_version=$(jq -r '.version' "$manifest") if [[ "$manifest_version" != "$current_version" ]]; then report_missing "$manifest" \ diff --git a/tools/check-version-sync.test.sh b/tools/check-version-sync.test.sh index a5db346f9..3062caf91 100755 --- a/tools/check-version-sync.test.sh +++ b/tools/check-version-sync.test.sh @@ -216,6 +216,9 @@ new_repo() { 'edition = "2024"' > "$repo/Cargo.toml" printf '%s\n' 'version = 4' > "$repo/Cargo.lock" printf '%s\n' '{"name":"fixture-packages"}' > "$repo/packages/package.json" + mkdir -p "$repo/packages/op-chrome-extension" + printf '{"manifest_version":3,"name":"fixture-extension","version":"%s"}\n' "$version" \ + > "$repo/packages/op-chrome-extension/manifest.json" cat > "$repo/crates/op-cli/assets/skill-bundle.json" <<'JSON' {"one":"__OPENPENCIL_VERSION__","two":"__OPENPENCIL_VERSION__","three":"__OPENPENCIL_VERSION__","four":"__OPENPENCIL_VERSION__","five":"__OPENPENCIL_VERSION__"}