Skip to content

Commit b15758f

Browse files
authored
Merge branch 'master' into router-link-fix
2 parents d20b645 + 652776a commit b15758f

8 files changed

+114
-24
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ng-sample/app/**/*.js
3030
# Webpack configuration files
3131
webpack.config.js
3232
tsconfig.esm.json
33+
tsconfig.tns.json
3334

3435
# IDEs and editors
3536
/.idea

Diff for: CONTRIBUTING.md

+89-20
Original file line numberDiff line numberDiff line change
@@ -81,36 +81,105 @@ If you want to contribute, but you are not sure where to start - look for [issue
8181

8282
## Publishing new versions
8383

84-
Instructions how to publish a new version for Maintainers.
8584

86-
1. Execute `npm install` to install dependencies and prepare the package for publishing:
87-
```bash
88-
cd nativescript-angular/nativescript-angular
89-
npm install
85+
## <a name="release"></a> Releasing new versions
86+
Instructions how to release a new version for **NativeScript Core Team Members**.
87+
88+
![](./release-contribution-guide-schema-webpack.png?raw=true)
89+
90+
1. Checkout release branch
91+
```
92+
cd nativescript-angular/nativescript-angular && git checkout release && git pull
93+
```
94+
#### If we prepare major or minor release, merge master in release branch else **skip this step**.
9095
```
96+
git merge --ff-only origin/master
97+
```
98+
*** Note: If there are commits in release branch which are not merged in master branch '-ff-merge' command will fail.
99+
In this case the commits should be merge firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
91100

92-
2. Add the following to your `.npmrc`:
101+
2. Execute `npm i` to install dependencies:
102+
```
103+
cd nativescript-angular && npm i
104+
```
105+
3. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version:
106+
```
107+
npm --no-git-tag-version version [patch|minor|major] -m "release: cut the %s release"
108+
```
109+
or
93110
```
94-
tag-version-prefix=""
95-
message="release: cut the %s release"
111+
npm --no-git-tag-version version [version] --allow-same-version -m "release: cut the %s release"
96112
```
113+
NOTE: Check the changelog!!!
97114

98-
3. Create new branch for the release:
99-
```bash
100-
git checkout -b username/release-version
115+
4. Create release-branch with change log
116+
```
117+
git checkout -b release-[version]
118+
```
119+
5. Add changes
101120
```
121+
git add changed-files
122+
git commit -m "release: cut the %s release"
123+
git push
124+
```
125+
NOTE: Make sure the PR is based on release branch
102126

103-
4. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version in the `package.json` file, tag the release and update the CHANGELOG.md:
104-
```bash
105-
npm version [patch|minor|major]
127+
6. Merge PR into release branch.
128+
129+
7. The merge will produce package with rc tag in npm. If all checks have passed, publish official package. Usually the night builds will be triggered and the package will be ready to be released on the next day.
130+
131+
8. Don't forget to tag the release branch
132+
```
133+
git tag [version]
134+
git push --tags
135+
```
136+
Only if needed to Tips to remove tags:
137+
```
138+
git push --delete origin [version]
139+
git tag -d [version]
106140
```
107141

108-
5. Push all the changes to your branch and create a pull request:
109-
```bash
110-
git push --set-upstream origin username/release-version --tags
142+
## Checkout master branch and bump version usually should be minor or major.
143+
144+
## Merge changes from release into master
145+
146+
## NOTE: Don't use git IDE/WEB
147+
148+
![](./merge-guidance-schema.png)
149+
150+
### Here are steps described in the diagram above.
151+
152+
1. Make sure you are in release branch:
153+
```
154+
git checkout release && git pull
155+
```
156+
2. Create PR to merge changes back in master and preserve history:
111157
```
158+
git checkout -b merge-release-in-master-[branch]/[sha]
159+
git push --set-upstream origin merge-release-in-master-branch-[branch]/[sha]
160+
git merge origin/master
161+
```
162+
3. Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom.
112163

113-
6. Publish the package to `npm` after the pull request is merged:
114-
```bash
115-
npm publish
164+
4. Add conflicts:
165+
```
166+
git add resolved files
167+
```
168+
5. Commit changes with default merge message:
169+
```
170+
git commit
171+
git push
172+
```
173+
174+
6. Create pull request which should be based on master. Replace replace env merge-release-in-master-branch with its value
175+
```
176+
curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}"
177+
```
178+
179+
**If needed, to revert file and take it from master:**
180+
```
181+
git checkout origin/master nativescript-angular/[some-file]
182+
git commit --amend
183+
git push --force-with-lease
116184
```
185+
This could require to repeat steps from 1 to 4, since we need to keep the branches with the same history

Diff for: e2e/config/mocha.opts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--timeout 140000
1+
--timeout 60000
22
--recursive e2e
33
--reporter mocha-multi
44
--reporter-options spec=-,mocha-junit-reporter=test-results.xml

Diff for: e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { ModalViewComponent } from "~/modal-shared/modal-view.component";
1616
<Button text="Show Modal Without Frame" (tap)="onModalNoFrame()" textAlignment="left"></Button>
1717
<Button text="Show Modal Page With Frame" (tap)="onModalFrame()" textAlignment="left"></Button>
1818
<Button text="Show Shared Modal" (tap)="onRootModalTap()" textAlignment="left"></Button>
19+
<Button #popoverButtonComp text="Show shared 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
1920
<Button text="Show Dialog" (tap)="onShowDialog()" textAlignment="left"></Button>
20-
<Button #popoverButtonComp text="Show 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
2121
</StackLayout>`
2222
})
2323

Diff for: e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("modal-shared:", () => {
1515
});
1616

1717
roots.forEach(root => {
18-
describe("Shared modal from second and back", () => {
18+
describe("Shared modal from home component and back", () => {
1919

2020
before(async () => {
2121
await screen[root]();
@@ -46,6 +46,11 @@ describe("modal-shared:", () => {
4646
await screen.closeModal();
4747
});
4848

49+
it("should open/close shared modal with presentation style from home component", async () => {
50+
await screen.loadSharedModalWithPresentationStyle(true);
51+
await screen.closeModal();
52+
});
53+
4954
it("should find home component again", async () => {
5055
await screen.loadedHome();
5156
});

Diff for: e2e/modal-navigation-ng/e2e/screens/screen.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppiumDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, SearchOptions } from "nativescript-dev-appium";
22
import { assert } from "chai";
33

44
const home = "Home Component"
@@ -165,6 +165,11 @@ export class Screen {
165165
await btnTap.click();
166166
}
167167

168+
private showSharedModalPresentationStyle = async () => {
169+
const btnTap = await this._driver.findElementByText("popover", SearchOptions.contains);
170+
await btnTap.click();
171+
}
172+
168173
loadedModalPage = async () => {
169174
const btnShowNestedModalPage = await this._driver.findElementByAutomationText(showNestedModalPage);
170175
assert.isTrue(await btnShowNestedModalPage.isDisplayed(), `${showNestedModalPage} is not displayed`);
@@ -212,6 +217,7 @@ export class Screen {
212217
}
213218

214219
loadedModalNoFrame = async () => {
220+
await this._driver.wait(2000);
215221
const btnShowDialogConfirm = await this._driver.waitForElement(showDialog);
216222
const btnCloseModal = await this._driver.waitForElement(closeModal);
217223
assert.isTrue(await btnShowDialogConfirm.isDisplayed());
@@ -309,4 +315,13 @@ export class Screen {
309315
const lbl = await this._driver.waitForElement(sharedModalView, 5000);
310316
assert.isTrue(await lbl.isDisplayed());
311317
}
318+
319+
loadSharedModalWithPresentationStyle = async (loadShowModalPageWithFrame: boolean) => {
320+
if (loadShowModalPageWithFrame) {
321+
await this.showSharedModalPresentationStyle();
322+
}
323+
324+
const lbl = await this._driver.waitForElement(sharedModalView, 5000);
325+
assert.isTrue(await lbl.isDisplayed());
326+
}
312327
}

Diff for: merge-guidance-schema.png

63.1 KB
Loading

Diff for: release-contribution-guide-schema-webpack.png

94.7 KB
Loading

0 commit comments

Comments
 (0)