|
1 |
| - |
2 |
| -# CLI Release Process |
3 |
| - |
4 | 1 | > Hans Larsen (hansl@google.com)
|
5 |
| -> October 7th, 2016 |
6 |
| -> Updated December 15th, 2016 |
7 |
| -
|
| 2 | +> June 8th, 2018 |
8 | 3 |
|
9 |
| -## Prerequisite |
10 | 4 |
|
11 |
| -1. Only the caretaker should be able to release the CLI to NPM. |
12 |
| -1. This document contains information that is only accessible to Google employees. |
13 |
| -1. This document contains steps that can only be performed by contributors to the project (needs write access). |
14 |
| - |
15 |
| -## Setting Up Local Repository |
| 5 | +# Setting Up Local Repository |
16 | 6 |
|
17 | 7 | 1. Clone the Angular-CLI repo. A local copy works just fine.
|
18 | 8 | 1. Create an upstream remote:
|
19 | 9 | ```bash
|
20 | 10 | $ git remote add upstream https://github.com/angular/angular-cli.git
|
21 | 11 | ```
|
22 | 12 |
|
| 13 | +# Caretaker |
| 14 | + |
| 15 | +The caretaker should triage issues, merge PR, and sheppard the release. |
| 16 | + |
| 17 | +Caretaker calendar can be found [here](https://calendar.google.com/calendar?cid=Z29vZ2xlLmNvbV9zZjlvODF0NGE4NzE5ZmtiMnBoZnA4MGk2Z0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t). |
| 18 | + |
| 19 | +## Triaging Issues |
| 20 | +TBD |
| 21 | + |
| 22 | +## Merging PRs |
| 23 | +TBD |
| 24 | + |
| 25 | +### Maintaining Patch Branches |
| 26 | +Everytime a PR is merged, commits need to be cherry-picked to an associated branch; |
| 27 | +* the latest patch branch (e.g. `1.2.x` or `1.3.x-rc.0`) should also be updated by cherry-picking all _applicable_ |
| 28 | + commits to it. `fix()`, `docs()`, `refactor()` and |
| 29 | + |
| 30 | +Say the following PR is merged; |
| 31 | + |
| 32 | +```text |
| 33 | +* fix(@angular/cli): fix path when doing stuff |
| 34 | +* refactor(@angular-devkit/core): replace Fizz with Buzz |
| 35 | +* feat(@angular-devkit/core): add new feature |
| 36 | +* fix(@angular-devkit/core): fix something related to new feature |
| 37 | +* refactor(@angular-devkit/core): move stuff to new feature |
| 38 | +``` |
| 39 | + |
| 40 | +Only the first 2 commits should be cherry picked to the patch branch, as the last 3 are related to a new feature. |
| 41 | + |
| 42 | +# Release |
| 43 | + |
| 44 | +## Shepparding |
| 45 | + |
| 46 | +As commits are cherry-picked when PRs are merged, creating the release should be a matter of updating the version |
| 47 | +numbers. This can be done with the following command (for patch): |
| 48 | + |
| 49 | +```bash |
| 50 | +devkit-admin release patch --force |
| 51 | +``` |
| 52 | + |
| 53 | +### Publishing |
| 54 | + |
| 55 | +**This can ONLY be done by a Google employee.** |
| 56 | + |
| 57 | +**It is a good idea to wait for CI to be green on the patch branch and tag before doing the release.** |
| 58 | + |
| 59 | +Check out the patch tag (e.g. `v6.7.8`), then run: |
| 60 | +```sh |
| 61 | +devkit-admin publish |
| 62 | +``` |
| 63 | + |
| 64 | +Check out the minor tag (e.g. `v6.8.0-beta.0`), then run: |
| 65 | +```bash |
| 66 | +devkit-admin publish --tag next |
| 67 | +``` |
| 68 | + |
| 69 | +### Release Notes |
| 70 | + |
| 71 | +Running the following command will output the release notes on stdout between v1.2.3 and 1.2.4: |
| 72 | + |
| 73 | +```bash |
| 74 | +devkit-admin changelog --from=v1.2.3 --to=v1.2.4 |
| 75 | +``` |
23 | 76 |
|
24 |
| -## Updating Local Repository |
| 77 | +Copy paste the output (you can use `| pbcopy` on MacOS) and create the release notes on github for the tag just |
| 78 | +released. If you have an API token for GitHub you can create a draft automatically by using the `--githubToken` flag. |
| 79 | +You just have then to confirm the draft. |
25 | 80 |
|
| 81 | +**Tags containing `beta` or `rc` should be marked as pre-release.** |
26 | 82 |
|
27 |
| -| | | |
28 |
| -|------|-----| |
29 |
| -|Author:|Hans Larsen| |
30 |
| -|Date:| October 7th, 2016| |
|
0 commit comments