Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modularization Release Process #1411

Closed
stephenplusplus opened this issue Jul 7, 2016 · 6 comments
Closed

Modularization Release Process #1411

stephenplusplus opened this issue Jul 7, 2016 · 6 comments
Assignees
Labels

Comments

@stephenplusplus
Copy link
Contributor

stephenplusplus commented Jul 7, 2016

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:

@callmehiphop
Copy link
Contributor

Overall I think it looks great, I only have a couple things to add in regards to 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:

What about the docs in lib/index.js?

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

I think this should be a gcloud-common discussion? (If it isn't already)

@jgeewax
Copy link
Contributor

jgeewax commented Jul 8, 2016

  • Could we use a term other than "release"? To some people this might mean just code changes, to others it might mean publish things to NPM. It'd be nice if it was extra clear about what's happening...
  • Can we use -- syntax for the major/minor/patch since it's a modifier ? (npm run <verb> bigquery --minor)

@stephenplusplus
Copy link
Contributor Author

Could we use a term other than "release"?

I chose it because it's all-encompassing, as opposed to just "build" or "publish", since it does both of those, and more. This is only a command that will be run by a maintainer of the library, so before they run it, they will have been told or read what it does. At its worst, if it is ambiguous, that might work in our favor in that the person running the command will check what it does. I'm open to ideas, though, if you can think of a better name.

@stephenplusplus
Copy link
Contributor Author

Can we use -- syntax for the major/minor/patch since it's a modifier ? (npm run bigquery --minor)

Examples updated 👍

@jgeewax
Copy link
Contributor

jgeewax commented Jul 8, 2016

@stephenplusplus
Copy link
Contributor Author

We have a publish script now which handles publishing an individual module. The chain effect originally discussed here, where publishing one module triggers another, is probably a little dangerous. What we have now is working so far, so until we see need to improve, let's close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants