npx skills add ...
npx skills add firebase/firebase-tools --skill update-pubsub-emulator
npx skills add firebase/firebase-tools --skill update-pubsub-emulator
How to update the Pub/Sub emulator
Update Local Emulator Run the following command to make sure you have the latest version of the pubsub emulator installed via gcloud:
Locate Emulator Directory
The emulator represents a directory likely located at <gcloud-install-path>/platform/pubsub-emulator.
You can find the exact path by running the emulator and checking the output, or by inspecting where gcloud is installed (e.g. which gcloud usually points to a bin directory, and the platform directory is a sibling of bin).
Verify the version by running the emulator or checking the VERSION file if it exists.
Package the Emulator
Zip the directory found in the previous step. Name it pubsub-emulator-<version>.zip.
Ensure the zip structure is such that the top-level directory inside the zip is pubsub-emulator.
Note: The existing code expects the binary at pubsub-emulator-<version>/pubsub-emulator/bin/cloud-pubsub-emulator inside the cache, which usually means the zip contains a root folder pubsub-emulator.
Upload to Storage Upload the zip file to the Firebase preview bucket:
Make the file publicly readable if necessary (usually the bucket permissions handle this, or use gcloud storage objects update ... --add-acl-grant=entity=allUsers,role=READER).
Note: For the version 0.8.27 update, this step was already done.
Calculate Metadata Calculate the file size in bytes, MD5 checksum, and SHA256 checksum of the zip file.
Update Configuration
Edit src/emulator/downloadableEmulatorInfo.json:
pubsub.version to the new version.pubsub.expectedSize.pubsub.expectedChecksum (MD5).pubsub.expectedChecksumSHA256.pubsub.remoteUrl and pubsub.downloadPathRelativeToCacheDir.Verify Run the emulators to ensure the new version is downloaded and starts correctly.
Add a Changelog Entry
Add a changelog entry to CHANGELOG.md like '- Updated Pub/Sub emulator to version '