|
1 | 1 | # Instructions for robotic code updates |
2 | 2 |
|
| 3 | +As only formulaic changes to this repo are anticipated in the near to medium |
| 4 | +future, it is reasonable to offload the generation of those changes to robotic |
| 5 | +code assistants. This file explains the workflows that need generative input. |
| 6 | + |
| 7 | + |
3 | 8 | ## General project information |
4 | 9 |
|
5 | | -* General information is available in the file README.md. |
| 10 | +* General information is available in the file `README.md`. |
6 | 11 |
|
7 | 12 | * Prefer using `git rebase` to `git merge` when taking in new changes. This |
8 | 13 | keeps the commit history simple for analysis. |
9 | 14 |
|
10 | 15 | ## Commit rules |
11 | 16 |
|
12 | | -* Every commit created by Gemini must end with the following note: |
| 17 | +* Use "Conventional Commits 1.0.0" to formulate the commit messages for each |
| 18 | + git commit. |
| 19 | + |
| 20 | +* Every commit and PR created by Gemini must end with the following note: |
13 | 21 |
|
14 | 22 | ``` |
15 | 23 | This commit was created by an automated coding assistant, with human |
|
46 | 54 | * Run `make publish` to publish all crates to `crates.io`. Do not use `cargo` |
47 | 55 | as we have a custom publication process. |
48 | 56 |
|
| 57 | +* Run `make cov` to update the function coverage report. |
| 58 | + |
49 | 59 | * If the previous step was a success, copy the contents of the file |
50 | 60 | `NEXT_VERSION` into the file `LAST_RELEASED_VERSION`. After that, increment |
51 | 61 | the semver in `NEXT_VERSION` by one minor version number. |
|
54 | 64 | changes, upholding the "Commit rules" section above. |
55 | 65 |
|
56 | 66 |
|
| 67 | +## Publishing a new buildenv for a new ICU version |
| 68 | + |
| 69 | +A new buildenv must be published if the buildenv itself is updated, or upon |
| 70 | +a new ICU release. |
| 71 | + |
| 72 | +### Preliminaries |
| 73 | + |
| 74 | +* Buildenv git tags use a format `buildenv-X.Y.Z`, where `X.Y.Z` is the semver |
| 75 | + version of a buildenv. Use this when looking for git tags. |
| 76 | + |
| 77 | +* ICU versions are usually just an integer. For example ICU 77 is version 77. |
| 78 | + |
| 79 | +* When publishing a new buildenv, ask the user which ICU version we are |
| 80 | + adding. |
| 81 | + |
| 82 | +* In case of any errors, remove all commits you have created in this process. |
| 83 | + |
| 84 | +## Procedure |
| 85 | + |
| 86 | +* In `build/Makefile`: |
| 87 | + |
| 88 | + * add the following deps into `.PRECIOUS` section, for |
| 89 | + ICU version `N`: |
| 90 | + * `push-maint-N.stamp`, `push-testenv-N.stamp`, `build-testenv-N.stamp`, |
| 91 | + `tag-testenv-N.stamp` in that order, where `N` is replaced by the respective |
| 92 | + ICU version. Follow the style of the `.PRECIOUS` target. |
| 93 | + |
| 94 | + * Modify the target label in the `test:` target in the file `build/Makefile` |
| 95 | + to match the latest ICU version. |
| 96 | + |
| 97 | + * Tag the current HEAD with `buildenv-X.Y.Z`, where `X.Y.Z` is the "next" |
| 98 | + version of buildenv, based on the previous version and an increment |
| 99 | + which follows the rules of "Semantic Versioning", based on conventional |
| 100 | + commits. |
| 101 | + |
| 102 | + * E.g. if only "fix:" and other tags are present in git commits made since |
| 103 | + the last buildenv tag, increment only the patch version number. |
| 104 | + |
| 105 | + * If at least one "feat:" is present, increment the minor version, reset |
| 106 | + minor version to zero. |
| 107 | + |
| 108 | + * If text "BREAKING CHANGE" is present in any commits since last, |
| 109 | + increment major version, reset minor and patch to zero. |
| 110 | + |
| 111 | +* In file `Makefile` at the top level dir do as follows: |
| 112 | + |
| 113 | + * Replace the value of `USED_BUILDENV_VERSION` with the just generated latest |
| 114 | + tag. |
| 115 | + |
| 116 | + * Add to target `static-bindgen` a dependency `static-bindgen-N.stamp`, where |
| 117 | + `N` is the ICU version. |
| 118 | + |
| 119 | + * Add to target `static-bindgen-special` a dependency |
| 120 | + `static-bindgen-special-N.stamp`, where `N` is the ICU version. |
| 121 | + |
| 122 | +* Once all changes are ready, create a git commit detailing the change in |
| 123 | + the description. |
| 124 | + |
| 125 | + * Then, send a PR for this change. |
| 126 | + |
| 127 | +* Make a new buildenv release as: |
| 128 | + |
| 129 | + `make buildenv` |
| 130 | + |
0 commit comments