diff --git a/cmd/rancher_release/README.md b/cmd/rancher_release/README.md index cac687cb..1682bcaa 100644 --- a/cmd/rancher_release/README.md +++ b/cmd/rancher_release/README.md @@ -43,18 +43,29 @@ Updates Rancher KDM branch references in: - `package/Dockerfile` - `Dockerfile.dapper` -| **Flag** | **Description** | **Required** | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| `fork-path`, `f` | Path for your fork of rancher/rancher. | TRUE | -| `base-branch`, `b` | The branch you want to update with the new KDM branch. | TRUE | -| `current-kdm-branch`, `c` | Current KDM branch used in the files listed above. | TRUE | -| `new-kdm-branch`, `n` | KDM branch to replace the current. | TRUE | -| `create-pr`, `p` | if true, will try to create a PR against the `base-branch` in rancher/rancher, may fail if your GitHub token doesn’t have the required permission. Requires a GITHUB_TOKEN env var to be set. | FALSE | -| `fork-owner`, `o` | GitHub Username of the owner of the rancher fork used in `rancher-fork`. | FALSE | -| `dry-run`, `r` | Changes will not be pushed to remote and the PR will not be created. | FALSE | +Non-required flags can be automatically set, if you are inside your rancher fork. ⚠️ If you decide to run this way, please double check your branch and directory ⚠️ + +| **Flag** | **Description** | **Required** | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | +| `fork-path`, `f` | Path for your fork of rancher/rancher. Default is the currenty directory you are running the command in. | FALSE | +| `base-branch`, `b` | The branch you want to update with the new KDM branch. Default is the current branch in your repo. | FALSE | +| `new-kdm-branch`, `n` | KDM branch to replace the current. | TRUE | +| `create-pr`, `p` | if true, will try to create a PR against the `base-branch` in rancher/rancher, may fail if your GitHub token doesn’t have the required permission. Requires a GITHUB_TOKEN env var to be set. | FALSE | +| `fork-owner`, `o` | GitHub Username of the owner of the rancher fork used in `rancher-fork`. Default is the username of the `origin` remote | FALSE | +| `dry-run`, `r` | Changes will not be pushed to remote and the PR will not be created. | FALSE | **Examples** +``` +rancher_release set-kdm-branch-refs -n dev-v2.8-september-patches --create-pr --dry-run +``` + +``` +export GITHUB_TOKEN={YOUR_GITHUB_TOKEN} + +rancher_release set-kdm-branch-refs -n dev-v2.8-september-patches -p -r +``` + ``` rancher_release set-kdm-branch-refs --fork-path $GOPATH/src/github.com/{YOUR_USERNAME}/rancher \ --base-branch release/v2.8 \ @@ -89,10 +100,12 @@ Updates Rancher branch references in charts: **Examples** ``` + rancher_release set-charts-branch-refs --fork-path $GOPATH/src/github.com/{YOUR_USERNAME}/rancher \ - --base-branch release/v2.8 \ - --current-charts-branch dev-v2.8 \ - --new-charts-branch dev-v2.9 + --base-branch release/v2.8 \ + --current-charts-branch dev-v2.8 \ + --new-charts-branch dev-v2.9 + ``` ``` @@ -100,6 +113,7 @@ rancher_release set-charts-branch-refs --fork-path $GOPATH/src/github.com/{YOUR_ export GITHUB_TOKEN={YOUR_GITHUB_TOKEN} rancher_release set-charts-branch-refs -f $GOPATH/src/github.com/{YOUR_USERNAME}/rancher -b release/v2.8 -c dev-v2.8 -n dev-v2.9 -p -o {YOUR_USERNAME} + ``` ### label-issues @@ -112,12 +126,11 @@ Given a release candidate, updates each GitHub issue belonging to its milestone rancher_release label-issues -t v2.8.1-rc1 --dry-run # Updating 2 issues # #1 Issue one (v2.8.x) -# [Waiting for RC] -> [To Test] +# [Waiting for RC] -> [To Test] # #2 Issue two (v2.8.x) -# [Waiting for RC] -> [To Test] +# [Waiting for RC] -> [To Test] ``` - ## Contributions - File Issue with details of the problem, feature request, etc.