From 2f1ba6f18bd874239faaa366bdd17e7b6ee8ce03 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Mon, 6 Aug 2018 20:13:14 +0300 Subject: [PATCH 1/3] chore: add npm version script --- CONTRIBUTING.md | 36 +++++++++++++++++++++++++++++++ nativescript-angular/package.json | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e66edd30..e027bde0b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ Here are some guides on how to do that: - [Requesting Features](#requesting-features) - [Submitting a PR](#submitting-a-pr) - [Where to Start](#where-to-start) +- [Publishing new versions](#publishing-new-versions) @@ -76,3 +77,38 @@ It's our turn from there on! We will review the PR and discuss changes you might ## Where to Start 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). + + +## Publishing new versions + +1. Run `npm install` to install the dependencies and prepare the package for publishing. +```bash +cd nativescript-angular +npm install +``` + +2. Add the following to your `.npmrc`. +``` +tag-version-prefix="" +message="release: cut the %s release" +``` + +3. Create new branch for the release: +``` +git checkout -b username/release-version +``` + +4. Run `npm version` to bump the version in the `package.json`, tag the release and update the CHANGELOG.md: +``` +npm version [patch|minor|major] +``` + +5. Push all changes to your branch and create a PR. +```bash +git push --set-upstream origin username/release-version --tags +``` + +6. Publish the package to npm after the PR is merged. +```bash +npm publish +``` diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json index 0229af3aa..85f7a8162 100644 --- a/nativescript-angular/package.json +++ b/nativescript-angular/package.json @@ -33,7 +33,8 @@ "tsc": "tsc -p tsconfig.json", "tsc-w": "tsc -p tsconfig.json -w", "ngc": "ngc -p tsconfig.json", - "prepare": "npm run ngc" + "prepare": "npm run ngc", + "version": "rm package-lock.json && conventional-changelog -p angular -i ../CHANGELOG.md -s && git add ../CHANGELOG.md" }, "bin": { "update-app-ng-deps": "./bin/update-app-ng-deps" From 3a75e3a407e04339822145aae7d257cd0f46731f Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Thu, 9 Aug 2018 11:40:19 +0300 Subject: [PATCH 2/3] docs(CONTRIBUTING): update Releasing new versions section Add a note that these instructions concern NativeScript Core Team Members. --- CONTRIBUTING.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e027bde0b..6031f6462 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,34 +81,36 @@ If you want to contribute, but you are not sure where to start - look for [issue ## Publishing new versions -1. Run `npm install` to install the dependencies and prepare the package for publishing. +Instructions how to publish a new version for **NativeScript Core Team Members**. + +1. Execute `npm install` to install dependencies and prepare the package for publishing: ```bash cd nativescript-angular npm install ``` -2. Add the following to your `.npmrc`. +2. Add the following to your `.npmrc`: ``` tag-version-prefix="" message="release: cut the %s release" ``` 3. Create new branch for the release: -``` +```bash git checkout -b username/release-version ``` -4. Run `npm version` to bump the version in the `package.json`, tag the release and update the CHANGELOG.md: -``` +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: +```bash npm version [patch|minor|major] ``` -5. Push all changes to your branch and create a PR. +5. Push all the changes to your branch and create a pull request: ```bash git push --set-upstream origin username/release-version --tags ``` -6. Publish the package to npm after the PR is merged. +6. Publish the package to `npm` after the pull request is merged: ```bash npm publish ``` From 123f2fd980a83308a4fc09f4cdfac21676494354 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Fri, 31 Aug 2018 14:48:31 +0300 Subject: [PATCH 3/3] docs(CONTRIBUTING): address comments --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6031f6462..13889f11d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,11 +81,11 @@ If you want to contribute, but you are not sure where to start - look for [issue ## Publishing new versions -Instructions how to publish a new version for **NativeScript Core Team Members**. +Instructions how to publish a new version for Maintainers. 1. Execute `npm install` to install dependencies and prepare the package for publishing: ```bash -cd nativescript-angular +cd nativescript-angular/nativescript-angular npm install ```