Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 29f2b2f

Browse files
authoredAug 31, 2018
chore: add npm version script (#1474)
* chore: add npm version script * docs(CONTRIBUTING): update Releasing new versions section Add a note that these instructions concern NativeScript Core Team Members. * docs(CONTRIBUTING): address comments
1 parent 2033f44 commit 29f2b2f

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
 

‎CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Here are some guides on how to do that:
1111
- [Requesting Features](#requesting-features)
1212
- [Submitting a PR](#submitting-a-pr)
1313
- [Where to Start](#where-to-start)
14+
- [Publishing new versions](#publishing-new-versions)
1415

1516
<!-- /TOC -->
1617

@@ -76,3 +77,40 @@ It's our turn from there on! We will review the PR and discuss changes you might
7677
## Where to Start
7778

7879
If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-angular/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
80+
81+
82+
## Publishing new versions
83+
84+
Instructions how to publish a new version for Maintainers.
85+
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
90+
```
91+
92+
2. Add the following to your `.npmrc`:
93+
```
94+
tag-version-prefix=""
95+
message="release: cut the %s release"
96+
```
97+
98+
3. Create new branch for the release:
99+
```bash
100+
git checkout -b username/release-version
101+
```
102+
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]
106+
```
107+
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
111+
```
112+
113+
6. Publish the package to `npm` after the pull request is merged:
114+
```bash
115+
npm publish
116+
```

‎nativescript-angular/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"tsc": "tsc -p tsconfig.json",
3434
"tsc-w": "tsc -p tsconfig.json -w",
3535
"ngc": "ngc -p tsconfig.json",
36-
"prepare": "npm run ngc"
36+
"prepare": "npm run ngc",
37+
"version": "rm package-lock.json && conventional-changelog -p angular -i ../CHANGELOG.md -s && git add ../CHANGELOG.md"
3738
},
3839
"bin": {
3940
"update-app-ng-deps": "./bin/update-app-ng-deps"

0 commit comments

Comments
 (0)
Please sign in to comment.