1
- > Hans Larsen (hansl@google.com )
2
- > June 8th, 2018
3
-
4
-
5
1
# Setting Up Local Repository
6
2
7
3
1 . Clone the Angular-CLI repo. A local copy works just fine.
@@ -20,12 +16,24 @@ Caretaker calendar can be found [here](https://calendar.google.com/calendar?cid=
20
16
TBD
21
17
22
18
## Merging PRs
23
- TBD
19
+
20
+ The list of PRs which are currently ready to merge (approved with passing status checks) can
21
+ be found with [ this search] ( https://github.com/angular/angular-cli/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved+status%3Asuccess ) .
22
+ This list should be checked daily and any ready PRs should be merged. For each
23
+ PR, check the ` PR target ` label to understand where it should be merged to. If
24
+ ` master ` is targetted, then click "Rebase and Merge". If the PR also targets a
25
+ patch branch, see [ Maintaining Patch Branches] ( #maintaining-patch-branches ) .
26
+ Whatever the target, rebasing should be used over merging to avoid cluttering
27
+ the Git history with merge commits.
24
28
25
29
### 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
30
+
31
+ When a PR is merged, if the ` PR target ` label includes a branch other than
32
+ ` master ` , commits will need to be cherry-picked to an associated branch. In
33
+ particular, the ` patch ` target simply refers to the latest patch branch (eg.
34
+ ` 1.2.x ` or ` 1.3.x-rc.0 ` ). This branch should be updated by cherry-picking all
35
+ _ applicable_ commits to it, such as those with messages beginning with ` fix() ` ,
36
+ ` docs() ` , or ` refactor() ` .
29
37
30
38
Say the following PR is merged;
31
39
@@ -54,6 +62,7 @@ git checkout <patch branch>
54
62
# Cherry pick the commit. Use the hash from the commit which was merged
55
63
# into upstream/master, which should be known to your local repo.
56
64
git cherry-pick -x < commit hash from master>
65
+ # If you have multiple cherry picks, you can do them all here.
57
66
58
67
# Resolve merge conflicts if necessary...
59
68
# Or abort and ask author to submit a separate commit targeting patch-only.
@@ -62,6 +71,16 @@ git cherry-pick -x <commit hash from master>
62
71
git push upstream < patch branch>
63
72
```
64
73
74
+ If you get a ` bad revision ` error when cherry picking, make sure you are using
75
+ the commit hash used when merged into ` master ` , _ not_ the hash listed in the PR.
76
+ Also verify that you have fetched ` master ` from ` upstream ` since that commit was
77
+ merged.
78
+
79
+ If the commit is not merged to ` master ` (because it targets ` patch only ` for
80
+ instance), then you will need to fetch the contributor's branch for your local
81
+ Git instance to have knowledge of the commit being cherry picked onto the patch
82
+ branch.
83
+
65
84
# Release
66
85
67
86
## Before releasing
@@ -88,10 +107,10 @@ git push upstream && git push upstream --tags
88
107
89
108
** It is a good idea to wait for CI to be green on the patch branch and tag before doing the release.**
90
109
91
- Check out the patch tag (e.g. ` v6.7.8 ` ), then run:
110
+ Check out the patch tag (e.g. ` v6.7.8 ` ), then run:
92
111
``` sh
93
112
devkit-admin publish
94
- ```
113
+ ```
95
114
96
115
Check out the minor tag (e.g. ` v6.8.0-beta.0 ` ), then run:
97
116
``` bash
@@ -123,7 +142,7 @@ For example, running the following command will output the release notes on stdo
123
142
124
143
``` bash
125
144
devkit-admin changelog --from=v1.2.3 --to=v1.2.4
126
- ```
145
+ ```
127
146
128
147
Copy paste the output (you can use ` | pbcopy ` on MacOS or ` |xclip ` on Linux) and create the release notes on github for the tag just
129
148
released. If you have an API token for GitHub you can create a draft automatically by using the ` --githubToken ` flag.
0 commit comments