hack/patch: fix some typos in README, make cherrypick.sh executable

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-11-30 11:09:26 -08:00
parent 66a9508fdf
commit 3167780cde
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# hack/cherrypick.sh # ./hack/patch/cherrypick.sh
Handles cherry-picks of PR(s) from etcd master to a stable etcd release branch automatically. Handles cherry-picks of PR(s) from etcd master to a stable etcd release branch automatically.
@ -15,22 +15,23 @@ one on github.com and register it locally with `git remote add ...`.
``` ```
export UPSTREAM_REMOTE=origin export UPSTREAM_REMOTE=origin
export FORK_REMOTE=${github-username} export FORK_REMOTE=${github-username}
export GITHUB_USER=${github-username}
``` ```
Next, install hub from https://github.com/github/hub Next, install hub from https://github.com/github/hub
## Usage ## Usage
To cherry pick PR 12345 onto release-2.22 and propose is as a PR, run: To cherry pick PR 12345 onto release-3.2 and propose is as a PR, run:
```sh ```sh
hack/cherrypick.sh upstream/release-2.2 12345 ./hack/patch/cherrypick.sh ${UPSTREAM_REMOTE}/release-3.2 12345
``` ```
To cherry pick 12345 then 56789 and propose them togther as a single PR, run: To cherry pick 12345 then 56789 and propose them togther as a single PR, run:
``` ```
hack/cherrypick.sh upstream/release-2.2 12345 56789 ./hack/patch/cherrypick.sh ${UPSTREAM_REMOTE}/release-3.2 12345 56789
``` ```

2
hack/patch/cherrypick.sh Normal file → Executable file
View File

@ -127,7 +127,7 @@ Cherry pick of ${PULLSUBJ} on ${rel}.
$(printf '%s\n' "${SUBJECTS[@]}") $(printf '%s\n' "${SUBJECTS[@]}")
EOF EOF
hub pull-request -F "${prtext}" -h "${GITHUB_USER}:${NEWBRANCH}" -b "etcd:${rel}" hub pull-request -F "${prtext}" -h "${GITHUB_USER}:${NEWBRANCH}" -b "coreos:${rel}"
} }
git checkout -b "${NEWBRANCHUNIQ}" "${BRANCH}" git checkout -b "${NEWBRANCHUNIQ}" "${BRANCH}"