Skip to content

Commit d122373

Browse files
authored
Merge branch 'master' into djenkov/list-view-templates
2 parents 86629dc + 25c99d8 commit d122373

118 files changed

Lines changed: 3196 additions & 25 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CONTRIBUTING.md‎

Lines changed: 78 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ module (usually named AppModule).
177177
ApplicationModule.
178178
All other NgModules in the app (both feature and lazy-loaded ones)
179179
should 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
181181
Angular apps. angular.io/guide/ngmodule-faq#q-browser-vs-common-module
182182
Migration steps:
183183
In 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
216216
Instructions 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-
234240
4. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version of `tns-platform-declarations`:
235-
```bash
241+
```
236242
cd 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"
238244
cd ..
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+
```
243251
cd 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"
245253
cd ..
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
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/settings.json
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Tests on Android",
11+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12+
"args": [
13+
"-u",
14+
"tdd",
15+
"--timeout",
16+
"999999",
17+
"--colors",
18+
// "${workspaceFolder}/test",
19+
"--opts",
20+
"./e2e/config/mocha.opts",
21+
"--runType",
22+
"android23",
23+
"--reuseDevice",
24+
"--verbose"
25+
],
26+
"internalConsoleOptions": "openOnSessionStart"
27+
},
28+
{
29+
"type": "node",
30+
"request": "launch",
31+
"name": "Launch Tests on iOS",
32+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
33+
"args": [
34+
"-u",
35+
"tdd",
36+
"--timeout",
37+
"999999",
38+
"--colors",
39+
// "${workspaceFolder}/test",
40+
"--opts",
41+
"./e2e/config/mocha.opts",
42+
"--runType",
43+
"sim.iPhoneX.iOS112",
44+
"--reuseDevice",
45+
"--verbose"
46+
],
47+
"internalConsoleOptions": "openOnSessionStart"
48+
},
49+
{
50+
"name": "Launch on iOS",
51+
"type": "nativescript",
52+
"request": "launch",
53+
"platform": "ios",
54+
"appRoot": "${workspaceRoot}",
55+
"sourceMaps": true,
56+
"stopOnEntry": false,
57+
"tnsArgs": [
58+
"--syncAllFiles"
59+
],
60+
"watch": true
61+
},
62+
{
63+
"name": "Attach on iOS",
64+
"type": "nativescript",
65+
"request": "attach",
66+
"platform": "ios",
67+
"appRoot": "${workspaceRoot}",
68+
"sourceMaps": true,
69+
"tnsArgs": [
70+
"--syncAllFiles"
71+
],
72+
"watch": false
73+
},
74+
{
75+
"name": "Launch on Android",
76+
"type": "nativescript",
77+
"request": "launch",
78+
"platform": "android",
79+
"appRoot": "${workspaceRoot}",
80+
"sourceMaps": true,
81+
"stopOnEntry": false,
82+
"tnsArgs": [
83+
"--syncAllFiles"
84+
],
85+
"watch": true
86+
},
87+
{
88+
"name": "Attach on Android",
89+
"type": "nativescript",
90+
"request": "attach",
91+
"platform": "android",
92+
"appRoot": "${workspaceRoot}",
93+
"sourceMaps": true,
94+
"tnsArgs": [
95+
"--syncAllFiles"
96+
],
97+
"watch": false
98+
}
99+
]
100+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Execute Tests
2+
=============
3+
4+
Android:
5+
6+
```
7+
npm run e2e -- --runType android23 # --devMode
8+
```
9+
10+
iOS:
11+
12+
```
13+
npm run e2e -- --runType sim.iPhoneX.iOS112 # --devMode
14+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="__PACKAGE__"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<supports-screens
8+
android:smallScreens="true"
9+
android:normalScreens="true"
10+
android:largeScreens="true"
11+
android:xlargeScreens="true"/>
12+
13+
<uses-sdk
14+
android:minSdkVersion="17"
15+
android:targetSdkVersion="__APILEVEL__"/>
16+
17+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
18+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
19+
<uses-permission android:name="android.permission.INTERNET"/>
20+
21+
<application
22+
android:name="com.tns.NativeScriptApplication"
23+
android:allowBackup="true"
24+
android:icon="@drawable/icon"
25+
android:label="@string/app_name"
26+
android:theme="@style/AppTheme">
27+
28+
<activity
29+
android:name="com.tns.NativeScriptActivity"
30+
android:label="@string/title_activity_kimera"
31+
android:configChanges="keyboardHidden|orientation|screenSize"
32+
android:theme="@style/LaunchScreenTheme">
33+
34+
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
35+
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN" />
38+
<category android:name="android.intent.category.LAUNCHER" />
39+
</intent-filter>
40+
</activity>
41+
<activity android:name="com.tns.ErrorReportActivity"/>
42+
</application>
43+
</manifest>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Add your native dependencies here:
2+
3+
// Uncomment to add recyclerview-v7 dependency
4+
//dependencies {
5+
// compile 'com.android.support:recyclerview-v7:+'
6+
//}
7+
8+
android {
9+
defaultConfig {
10+
generatedDensities = []
11+
applicationId = "org.nativescript.nestedframenavigation"
12+
}
13+
aaptOptions {
14+
additionalParameters "--no-version-vectors"
15+
}
16+
}
3.42 KB
Loading
6.8 KB
Loading
32.4 KB
Loading
1.31 KB
Loading

0 commit comments

Comments
 (0)