Skip to content

feat: add publish-rc script for publishing RCs from feature branches#981

Open
cabljac wants to merge 1 commit intomainfrom
feat/publish-rc-script
Open

feat: add publish-rc script for publishing RCs from feature branches#981
cabljac wants to merge 1 commit intomainfrom
feat/publish-rc-script

Conversation

@cabljac
Copy link
Copy Markdown
Collaborator

@cabljac cabljac commented Mar 31, 2026

Summary

  • Adds scripts/publish-rc.js — a root-level script to publish RC versions of extensions whose version has been bumped vs main
  • Uses firebase ext:dev:upload --stage=rc so no changes to extension.yaml are needed
  • Detects bumped extensions via git show main:{ext}/extension.yaml (fast, offline)
  • Adds npm run publish-rc to root package.json

Usage

npm run publish-rc                               # all bumped extensions
npm run publish-rc -- firestore-genai-chatbot    # single extension
npm run publish-rc -- --dry-run                  # preview commands without publishing
npm run publish-rc -- --yes                      # skip confirmation prompt

Test plan

  • Run npm run publish-rc -- --dry-run from a branch with version bumps and confirm the correct firebase ext:dev:upload --stage=rc --ref={branch} commands are printed
  • Confirm running on main prints an error and exits
  • Confirm single extension targeting works
  • Run without --dry-run on a real bumped branch to publish an actual RC

Adds scripts/publish-rc.js and a root-level npm run publish-rc command.
Detects version-bumped extensions vs main via git, then runs
firebase ext:dev:upload --stage=rc for each. Supports --dry-run,
--yes, and single-extension targeting.
function getMainVersion(extName) {
try {
const content = execSync(
`git show main:${extName}/extension.yaml`,

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
file name
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants