Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Improve publishing process #115

Merged
merged 4 commits into from
Apr 25, 2018
Merged

Improve publishing process #115

merged 4 commits into from
Apr 25, 2018

Conversation

pento
Copy link
Member

@pento pento commented Apr 25, 2018

Improve the documentation for the package release process.

  • Remind people that they must have 2FA enabled.
  • Add instructions for using 2FA while publishing.
  • Add a reminder to check for publishConfig settings before publishing new packages.

This also adds a check for "publishConfig": { "access": "public" } being set in each module's package.json. npm run build will fail (causing Travis, and publishing to fail) if it isn't set.

@pento pento force-pushed the update/improve-publishing-process branch from ab35d7a to 9af1934 Compare April 25, 2018 02:50
const config = require( packageFile );
if ( ! config.publishConfig || 'public' !== config.publishConfig.access ) {
process.stdout.write( `${ ERROR } package.json must include "publishConfig": { "access": "public" }\n` );
process.exitCode = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with this usage, the script will continue to run, but exit with a code of 1? vs. process.exit( 1 ) which terminates immediately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, I figured it was fine to let it run to completion, so you see build errors for all modules, if there are multiple.

CONTRIBUTING.md Outdated

### Development release

Run the following command to release a dev version of the outdated packages:
Run the following command to release a dev version of the outdated packages, replacing "123456" with your 2FA code:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth making a note that since publishing can take some time, it is good to ensure that the one-time code still has a decent duration remaining before starting the process. Made more cumbersome by the fact that the developer needs to navigate through the publishing options before publishing starts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@pento pento merged commit 1c4d1b0 into master Apr 25, 2018
@pento pento deleted the update/improve-publishing-process branch April 25, 2018 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants