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

Docs release fixes #631

Merged
merged 40 commits into from
Jan 4, 2019
Merged

Docs release fixes #631

merged 40 commits into from
Jan 4, 2019

Conversation

shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Jan 4, 2019

I tested these commits on #625 directly, but for the sake of tracking my work better I force-pushed that release branch back to 7ec1057 and am going to merge this separately. Here's the deal:

  1. Docs site deployment and all release scripts are now run in the Travis deploy stage, which makes them easier to track. They will only ever run in the "push" build (not the "pull request" build; /cc Eliminate Travis PR builds #259), and all pre-deployment now logic lives in before_deploy rather than after_success. script/after_success is gone.

  2. Replace our whole crazy release candidate logic with a lerna publish --canary, which allows Lerna to do the heavy lifting again.

    ⚠️ The only thing to be aware of with this change is that we won't have what I consider to be more "correct" release candidate versions published (e.g. primer@10.10.3-rc.0, but instead something like primer@10.10.4-alpha.<sha> (note the patch version increment!). I liked being able to just remove the -rc.x bit from the end when updating dependents, but there's a serious issue of code rot in that custom release candidate logic, and this will all be going away if/when we move away from the monorepo and conventional commits anyway.

  3. I had to add a kind of silly workaround to deal with how Lerna undoes its changes to version field changes in package.json files after a canary release. The primer/scripts/postinstall.js Node script is a Lerna-specific hook that just writes the published version to ../VERSION, and script/deploy-docs then updates its primer dependency version to this value so that Now will pull the correct version of Primer when it deploys. (Without this, Now deployments fail in a release because the primer dependency version hasn't yet been published.)

  4. Fix the docs deployment URL branch slug, which used to be $TRAVIS_BRANCH but should be $TRAVIS_PULL_REQUEST_BRANCH. Before this, Release 10.10.3 #625 attempts to alias to primer-css-master:

    image

@shawnbot shawnbot mentioned this pull request Jan 4, 2019
10 tasks
@shawnbot shawnbot removed the request for review from emplums January 4, 2019 19:04
@shawnbot
Copy link
Contributor Author

shawnbot commented Jan 4, 2019

FYI @jonrohan, the actual diff is way easier to read. I merged #632 into this branch manually, which is (I think) why those commits are showing up.

Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Scanning over this looks good. FWIW I'm fine with loosing rc release naming. It shouldn't effect how we release.

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

Successfully merging this pull request may close these issues.

2 participants