|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -## SAP CX Tools Contributor License Agreement |
| 3 | +## CX DEV Tools Contributor License Agreement |
4 | 4 |
|
5 | 5 | - You will only submit contributions where you have authored 100% of the content. |
6 | 6 | - You will only submit contributions to which you have the necessary rights. This means that if you are employed you |
@@ -42,7 +42,7 @@ Please add the following lines to your pull request description: |
42 | 42 | ```markdown |
43 | 43 | --- |
44 | 44 |
|
45 | | -I hereby agree to the terms of the SAP CX Tools Contributor License Agreement. |
| 45 | +I hereby agree to the terms of the CX DEV Tools Contributor License Agreement. |
46 | 46 | ``` |
47 | 47 |
|
48 | 48 | ## Coding Conventions |
@@ -120,64 +120,3 @@ Use American English spelling rules when writing documentation as well as for co |
120 | 120 | - `WARN`: potential usage or configuration errors that should not halt execution |
121 | 121 | - `INFO`: information the users might want to know but not by default |
122 | 122 | - `DEBUG`: information the developers might want to know to understand execution |
123 | | - |
124 | | -## Extensions |
125 | | - |
126 | | -All of the extensions have their own repository and are integrated using `git subtree` into this repository or into project. This |
127 | | -procedure was choosen for two major reasons: |
128 | | - |
129 | | -1. A centralized repository holding defined releases of the individual extensions and guaranteeing the compatibility with the standard. |
130 | | -1. The individual extension repositories allow a clean integration into projects, i.e. direct integration of the source code. |
131 | | - |
132 | | -### How-to use |
133 | | - |
134 | | -In order to use an extension from the sapcx.tools you can either download the build artefact from our build pipeline (work in progress) or |
135 | | -integration the extension directly into your repository using git subtree. The following commands shall give you a guidance on how to |
136 | | -integration the extensions into your local repository. Keep in mind, that you need to run these commands from the root of your project. |
137 | | -For the sake of simplicity, we assume that you use the default CCv2 repository layout for your project: |
138 | | - |
139 | | -- The following command is used to add an extension "foobar" into your repository: |
140 | | -`git subtree add --squash --message="add extension foobar from SAP CX Tools" --prefix=core-customize/hybris/bin/custom/sapcxtools/foobar git@github.com:sapcxtools/foobar.git main` |
141 | | -- For future updates, please use the following command: |
142 | | -`git subtree pull --squash --message="update extension foobar from SAP CX Tools" --prefix=core-customize/hybris/bin/custom/sapcxtools/foobar git@github.com:sapcxtools/foobar.git main` |
143 | | -- If you want to push changes from the local repository into the extension, please use: |
144 | | -`git subtree push --prefix=core-customize/hybris/bin/custom/sapcxtools/foobar git@github.com:sapcxtools/foobar.git feature/<name-of-your-feature>` |
145 | | - |
146 | | -Please note, we typically use `--squash` to reduce the number of commits within your project repository. If you want the whole history |
147 | | -available in your project, feel free to leave out this parameter. Still, we do not recommend this. We also do not recommend to pull other |
148 | | -branches than main. This could lead to conflicts once you want to update back to main. |
149 | | - |
150 | | -### Guidelines for the individual extension repositories |
151 | | - |
152 | | -Before merging a feature into the `main` branch of an extension, a github workflow sends the feature-branch to the centralized repository. |
153 | | -Let's assume a new feature `feature/my-idea` was pushed via `git subtree push` into extension `foobar`. The workflow checks out the |
154 | | -centralized repository, and creates a branch called `foobar/feature/my-idea`. Then it performs a `git subtree pull` command without |
155 | | -`--squash` and pointing to the feature branch `feature/my-idea` from the `foobar` extension. It pushes the new branch to the centralized |
156 | | -repository. |
157 | | - |
158 | | -The centralized repository now also runs a github workflow that automatically creates a pull-request into the `develop` branch for this |
159 | | -feature. With that pull-request, the default workflows from the centralized repository are executed, verifying if everything is fine. In |
160 | | -addition, the repository maintainer will perform custom reviews and may ask you for changes. You can perform your changes within your |
161 | | -project repository and by pushing those to the extension repository `foobar` by updating your feature-branch `feature/my-idea`. This can |
162 | | -be done by running the same `git subtree push` command as before, after you have made your changes in the project repository. |
163 | | - |
164 | | -The github workflow will detect your updates and updates the feature-branch on the centralized repository by resetting it to the previous |
165 | | -state, typically develop, and run `git subtree pull` just like the first time. We need to reset the feature-branch `foobar/feature/my-idea` |
166 | | -first, otherwise we would get an additional merge commit for every update of the the feature-branch. |
167 | | - |
168 | | -Once the pull-request from feature-branch `foobar/feature/my-idea` was accepted and merged into `develop` the feature-branch `feature-my-idea` |
169 | | -will also be removed from the extensions repository. Another github workflow is triggered that automatically pulls the changes with the |
170 | | -`develop` branch of the centralized repository and updates the `develop` branch of the extensions repository by running: |
171 | | -`git subtree pull --squash --message="merge feature/my-idea into develop" --prefix=core-customize/hybris/bin/custom/sapcxtools/foobar git@github.com:sapcxtools/foobar.git develop` |
172 | | - |
173 | | -When the next version of SAP CX tools is released, the same action is done, all included extensions are triggered to also merge their |
174 | | -`develop` branches into their `main` branches, just like the centralized repository. After the release we recommend you to run an update |
175 | | -as mentioned above. Again, we do not recommend to skip the `--squash` option, as you will see all your commits twice in the history. |
176 | | - |
177 | | -__CAUTION:__ For those who use this repository itself to develop on features, please make sure that you do not push your changes from the |
178 | | -extensions to the extensions repositories using `git subtree push`. This will be done automatically for you, once your pull-request has |
179 | | -been accepted and merged into `develop`. Also make sure that you only use the pattern `feature/<name>` for your feature-branches, so there |
180 | | -won't be any kind of conflicts with the feature-branches that have automatically been created. |
181 | | - |
182 | | -While this process seems to be complicated, it guarantees that all extensions included in SAP CX tools are interoperatable and work |
183 | | -individually, with only their own dependencies resolved. If you have questions, feel free to get in touch with us in the discussion board. |
0 commit comments