@@ -177,7 +177,7 @@ module (usually named AppModule).
177177ApplicationModule.
178178All other NgModules in the app (both feature and lazy-loaded ones)
179179should import the NativeScriptCommonModule instead.
180- The behaviour is alligned with BrowserModule and CommonModule in web
180+ The behavior is aligned with BrowserModule and CommonModule in web
181181Angular apps. angular.io/guide/ngmodule-faq#q-browser-vs-common-module
182182Migration steps:
183183In all NgModules, instead of the root one, replace:
@@ -211,43 +211,98 @@ If you want to contribute, but you are not sure where to start - look for [issue
211211
212212[ commit-message-format ] : https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
213213
214- ## <a name =" release " ></a > Releasing new versions
215214
215+ ## <a name =" release " ></a > Releasing new versions
216216Instructions how to release a new version for ** NativeScript Core Team Members** .
217217
218- 1 . Execute ` npm install ` to install dependencies:
219- ``` bash
220- npm install
221- ```
218+ ![ ] ( ./release-contribution-guide-schema.png?raw=true )
222219
223- 2 . Add the following to your ` .npmrc ` :
220+ ### Here are the steps described in the diagram above.
221+
222+ 1 . Checkout release branch
224223```
225- tag-version-prefix=""
226- message="release: cut the %s release"
224+ git checkout release
227225```
228-
229- 3 . Create new branch based on ` master ` :
230- ``` bash
231- git checkout -b username/release-version
226+ 2 . Create a PR to cut the release:
227+ ```
228+ git checkout -b release-version
229+ git push --set-upstream origin release-version
230+ ```
231+ #### Merge master in release branch or cherry-pick commits. If the commits are in release branch ** skip this step** .
232+ ```
233+ git merge --ff-only origin/master or git cherry-pick commit-sha
234+ git push --set-upstream origin prep-release-version
235+ ```
236+ 3 . Execute ` npm i ` to install dependencies:
237+ ```
238+ npm i
232239```
233-
2342404 . Execute [ ` npm version ` ] ( https://docs.npmjs.com/cli/version ) to bump the version of ` tns-platform-declarations ` :
235- ``` bash
241+ ```
236242cd tns-platform-declarations
237- npm --no-git-tag-version version [patch | minor| major]
243+ npm --no-git-tag-version version [major |minor|patch] -m "release: cut the %s release"
238244cd ..
239245```
240246
241- 5 . Execute [ ` npm version ` ] ( https://docs.npmjs.com/cli/version ) to bump the version of ` tns-core-modules ` , tag the release and update the CHANGELOG.md:
242- ``` bash
247+ 5 . Execute [ ` npm version ` ] ( https://docs.npmjs.com/cli/version ) to bump the version of ` tns-core-modules ` ,
248+ tag the release and update the CHANGELOG.md.
249+ In case we need to publish release version we need simply to use npm version x.x.x-rc
250+ ```
243251cd tns-core-modules
244- npm version [patch | minor| major]
252+ npm --no-git-tag- version version [major |minor|patch] -m "release: cut the %s release"
245253cd ..
246254```
255+ 6 . Set correct version of ** tns-core-modules-widgets** in tns-core-modules/package.json.
256+ Usually tns-core-modules-widgets should already have been released and we need to set the official version.
247257
248- 6 . Push all the changes to your branch and open a pull request:
249- ``` bash
250- git push --set-upstream origin username/release-version --tags
258+ 7 . Add changes
251259```
260+ git add changed-files
261+ git commit -m "release: cut the %s release"
262+ git push
263+ ```
264+ 8 . Create git tag
265+ ```
266+ git tag release-version
267+ git push --tags
268+ ```
269+ 9 . Merge PR into release branch.
270+
271+ 10 . If all checks has passed publish package.
272+
273+ ## Merge changes from release into master
252274
253- 7 . Create ` release ` branch after the pull request is merged to ` master ` and publish the packages built on CI to ` npm ` .
275+ ![ ] ( ./merge-guidance-schema.png )
276+
277+ ### Here are steps described in the diagram above.
278+
279+ 1 . Make sure you are in release branch:
280+ ```
281+ git checkout release
282+ git pull
283+ ```
284+ 2 . Create PR to merge changes back in master and preserve history:
285+ ```
286+ git checkout -b merge-release-in-master
287+ git push --set-upstream origin merge-release-in-master
288+ git merge origin/master
289+ ```
290+ 3 . Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom.
291+
292+ 4 . Add conflicts:
293+ ```
294+ git add resolved files
295+ ```
296+ 5 . Commit changes with default merge message:
297+ ```
298+ git commit
299+ git push
300+ ```
301+
302+ ** If needed, revert version of modules and platform declarations to take the one from master:**
303+ ```
304+ git checkout origin/master tns-platform-declarations/package.json tns-core-modules/package.json
305+ git commit --amend
306+ git push --force-with-lease
307+ ```
308+ This will require to repeat steps from 1 to 4, since we need to keep the branches with the same history
0 commit comments