Skip to content

Modularization Release Process #1411

@stephenplusplus

Description

@stephenplusplus

Here's the current plan regarding how to publish updates to the core gcloud module or the future @gcloud/{service} sub-modules. Thoughts very welcome!


An npm run script will be created to release a module:

$ npm run release [SERVICE_NAME] --major|minor|patch

Here's what happens if you wanted to publish the core gcloud module with a major update.

$ npm run release --major

# runs:
rm -rf node_modules && npm install
npm run lint
npm run test
npm run system-test
npm version major
rm -rf node_modules && npm publish
git push origin master --follow-tags

Here's what happens if you wanted to release a major update to the BigQuery API.

$ npm run release bigquery --major

# runs:
cd lib/bigquery
rm -rf node_modules && npm install
npm run lint
npm run test
npm run system-test
npm version major
rm -rf node_modules && npm publish
git push origin master --follow-tags

# Because it was a MAJOR increment (breaking changes):
npm uninstall --save @gcloud/bigquery
npm install --save @gcloud/bigquery # to depend on the new release
git commit -am 'Update @gcloud/bigquery'
npm run release [minor|major] # depending on if gcloud-node is < or > 1.0

Here's what happens if you wanted to release a patch update to the BigQuery API.

$ npm run release bigquery --patch

# runs:
cd lib/bigquery
rm -rf node_modules && npm install
npm run lint
npm run test
npm run system-test
npm version patch
rm -rf node_modules && npm publish
git push origin master --follow-tags

How about the docs?

The core package will no longer have its own JSON files. Instead, each service will have a directory in gh-pages that the core package doc pages will pull from:

$ git checkout gh-pages
$ ls
  docs
  |_ json
    |_ { existing version directories for pre-modularization JSON files }
    |_ bigquery
      |_ v0.1.0
        |_ dataset.json
        |_ index.json
        |_ job.json
        |_ table.json
        |_ types.json

How does the docs site load the correct JSON files from the modules?

Still thinking! Possible tools that can help:

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions