@@ -159,12 +159,12 @@ will be different in your situation.
159
159
<!--
160
160
Here's an example of editing a comment in the Kubernetes source code.
161
161
162
- In your local kubernetes/kubernetes repository, check out the master branch,
162
+ In your local kubernetes/kubernetes repository, check out the default branch,
163
163
and make sure it is up to date:
164
164
-->
165
165
以下在 Kubernetes 源代码中编辑注释的示例。
166
166
167
- 在您本地的 kubernetes/kubernetes 代码仓库中,检出 master 分支 ,并确保它是最新的:
167
+ 在您本地的 kubernetes/kubernetes 代码仓库中,检出默认分支 ,并确保它是最新的:
168
168
169
169
``` shell
170
170
cd < k8s-base>
@@ -173,9 +173,9 @@ git pull https://github.com/kubernetes/kubernetes master
173
173
```
174
174
175
175
<!--
176
- Suppose this source file in the master branch has the typo "atmost":
176
+ Suppose this source file in that default branch has the typo "atmost":
177
177
-->
178
- 假设 master 分支中的下面源文件中包含拼写错误 "atmost":
178
+ 假设默认分支中的下面源文件中包含拼写错误 "atmost":
179
179
180
180
[ kubernetes/kubernetes/staging/src/k8s.io/api/apps/v1/types.go] ( https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/apps/v1/types.go )
181
181
@@ -228,7 +228,6 @@ Go to `<k8s-base>` and run these scripts:
228
228
hack/update-generated-swagger-docs.sh
229
229
hack/update-openapi-spec.sh
230
230
hack/update-generated-protobuf.sh
231
- hack/update-api-reference-docs.sh
232
231
```
233
232
234
233
<!-- Run `git status` to see what was generated. -->
@@ -238,8 +237,6 @@ hack/update-api-reference-docs.sh
238
237
On branch master
239
238
...
240
239
modified: api/openapi-spec/swagger.json
241
- modified: api/swagger-spec/apps_v1.json
242
- modified: docs/api-reference/apps/v1/definitions.html
243
240
modified: staging/src/k8s.io/api/apps/v1/generated.proto
244
241
modified: staging/src/k8s.io/api/apps/v1/types.go
245
242
modified: staging/src/k8s.io/api/apps/v1/types_swagger_doc_generated.go
@@ -310,24 +307,27 @@ In the preceding section, you edited a file in the master branch and then ran sc
310
307
to generate an OpenAPI spec and related files. Then you submitted your changes in a pull request
311
308
to the master branch of the kubernetes/kubernetes repository. Now suppose you want to backport
312
309
your change into a release branch. For example, suppose the master branch is being used to develop
313
- Kubernetes version 1.10, and you want to backport your change into the release-1.9 branch.
310
+ Kubernetes version {{< skew latestVersion >}}, and you want to backport your change into the
311
+ release-{{< skew prevMinorVersion >}} branch.
314
312
-->
315
313
### 将你的提交 Cherrypick 到发布分支
316
314
317
315
在上一节中,你在 master 分支中编辑了一个文件,然后运行了脚本用来生成 OpenAPI 规范和相关文件。
318
316
然后用 PR 将你的更改提交到 kubernetes/kubernetes 代码仓库的 master 分支中。
319
317
现在,需要将你的更改反向移植到已经发布的分支。
320
- 例如,假设 master 分支被用来开发 Kubernetes 1.10 版,并且你想将更改反向移植到 release-1.9 分支。
318
+ 例如,假设 master 分支被用来开发 Kubernetes {{< skew latestVersion >}} 版,
319
+ 并且你想将更改反向移植到 release-{{< skew prevMinorVersion >}} 分支。
321
320
322
321
<!--
323
322
Recall that your pull request has two commits: one for editing `types.go`
324
323
and one for the files generated by scripts. The next step is to propose a cherry pick of your first
325
- commit into the release-1.9 branch. The idea is to cherry pick the commit that edited `types.go`, but not
326
- the commit that has the results of running the scripts. For instructions, see
324
+ commit into the release-{{< skew prevMinorVersion >}} branch. The idea is to cherry pick the commit
325
+ that edited `types.go`, but not the commit that has the results of running the scripts. For instructions, see
327
326
[Propose a Cherry Pick](https://git.k8s.io/community/contributors/devel/sig-release/cherry-picks.md).
328
327
-->
329
328
回想一下,您的 PR 有两个提交:一个用于编辑 ` types.go ` ,一个用于由脚本生成的文件。
330
- 下一步是将你的第一次提交 cherrypick 到 release-1.9 分支。这样做的原因是仅 cherrypick 编辑了 types.go 的提交,
329
+ 下一步是将你的第一次提交 cherrypick 到 release-{{< skew prevMinorVersion >}} 分支。
330
+ 这样做的原因是仅 cherrypick 编辑了 types.go 的提交,
331
331
而不是具有脚本运行结果的提交。
332
332
有关说明,请参见[ 提出 Cherry Pick] ( https://git.k8s.io/community/contributors/devel/sig-release/cherry-picks.md ) 。
333
333
@@ -337,16 +337,17 @@ pull request. If you don't have those permissions, you will need to work with so
337
337
and milestone for you.
338
338
-->
339
339
{{< note >}}
340
- 提出 Cherry Pick 要求你有权在 PR 中设置标签和里程碑。如果您没有这些权限 ,
340
+ 提出 Cherry Pick 要求你有权在 PR 中设置标签和里程碑。如果你没有这些权限 ,
341
341
则需要与可以为你设置标签和里程碑的人员合作。
342
342
{{< /note >}}
343
343
344
344
<!--
345
- When you have a pull request in place for cherry picking your one commit into the release-1.9 branch,
346
- the next step is to run these scripts in the release-1.9 branch of your local environment.
345
+ When you have a pull request in place for cherry picking your one commit into the
346
+ release-{{< skew prevMinorVersion >}} branch, the next step is to run these scripts in the
347
+ release-{{< skew prevMinorVersion >}} branch of your local environment.
347
348
-->
348
- 当你发起 PR 将你的一个提交 cherry pick 到 release-1.9 分支中时,下一步是在本地环境的 release-1.9
349
- 分支中运行如下脚本。
349
+ 当你发起 PR 将你的一个提交 cherry pick 到 release-{{< skew prevMinorVersion >}} 分支中时,
350
+ 下一步是在本地环境的 release-{{< skew prevMinorVersion >}} 分支中运行如下脚本。
350
351
351
352
``` shell
352
353
hack/update-generated-swagger-docs.sh
@@ -357,24 +358,29 @@ hack/update-api-reference-docs.sh
357
358
358
359
<!--
359
360
Now add a commit to your cherry-pick pull request that has the recently generated OpenAPI spec
360
- and related files. Monitor your pull request until it gets merged into the release-1.9 branch.
361
+ and related files. Monitor your pull request until it gets merged into the
362
+ release-{{< skew prevMinorVersion >}} branch.
361
363
-->
362
364
现在将提交添加到您的 Cherry-Pick PR 中,该 PR 中包含最新生成的 OpenAPI 规范和相关文件。
363
- 关注你的 PR,直到其合并到 release-1.9 分支中为止。
365
+ 关注你的 PR,直到其合并到 release-{{< skew prevMinorVersion >}} 分支中为止。
364
366
365
367
<!--
366
- At this point, both the master branch and the release-1.9 branch have your updated `types.go`
368
+ At this point, both the master branch and the release-{{< skew prevMinorVersion >}} branch have your updated `types.go`
367
369
file and a set of generated files that reflect the change you made to `types.go`. Note that the
368
- generated OpenAPI spec and other generated files in the release-1.9 branch are not necessarily
369
- the same as the generated files in the master branch. The generated files in the release-1.9 branch
370
- contain API elements only from Kubernetes 1.9 . The generated files in the master branch might contain
371
- API elements that are not in 1.9 , but are under development for 1.10 .
370
+ generated OpenAPI spec and other generated files in the release-{{< skew prevMinorVersion >}} branch are not necessarily
371
+ the same as the generated files in the master branch. The generated files in the release-{{< skew prevMinorVersion >}} branch
372
+ contain API elements only from Kubernetes {{< skew prevMinorVersion >}} . The generated files in the master branch might contain
373
+ API elements that are not in {{< skew prevMinorVersion >}} , but are under development for {{< skew latestVersion >}} .
372
374
-->
373
- 此时,master 分支和 release-1.9 分支都具有更新的 ` types.go ` 文件和一组生成的文件,
375
+ 此时,master 分支和 release-{{< skew prevMinorVersion >}}
376
+ 分支都具有更新的 ` types.go ` 文件和一组生成的文件,
374
377
这些文件反映了对 ` types.go ` 所做的更改。
375
- 请注意,生成的 OpenAPI 规范和其他 release-1.9 分支中生成的文件不一定与 master 分支中生成的文件相同。
376
- release-1.9 分支中生成的文件仅包含来自 Kubernetes 1.9 的 API 元素。
377
- master 分支中生成的文件可能包含不在 1.9 中但正在为 1.10 开发的 API 元素。
378
+ 请注意,生成的 OpenAPI 规范和其他 release-{{< skew prevMinorVersion >}}
379
+ 分支中生成的文件不一定与 master 分支中生成的文件相同。
380
+ release-{{< skew prevMinorVersion >}} 分支中生成的文件仅包含来自
381
+ Kubernetes {{< skew prevMinorVersion >}} 的 API 元素。
382
+ master 分支中生成的文件可能包含不在 {{< skew prevMinorVersion >}}
383
+ 中但正在为 {{< skew latestVersion >}} 开发的 API 元素。
378
384
379
385
<!--
380
386
## Generating the published reference docs
0 commit comments