auto-dist-tag
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "auto-dist-tag", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Automatically rewrites the publishConfig.tag setting in your package.json file for you", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/Turbo87/auto-dist-tag#readme", |
auto-dist-tag | ||
=============================================================================== | ||
[](https://greenkeeper.io/) | ||
[](https://travis-ci.org/Turbo87/auto-dist-tag) | ||
[](https://www.npmjs.com/package/auto-dist-tag) | ||
Automatically rewrites the `publishConfig.tag` setting in your | ||
`package.json` file for you | ||
> Automatically rewrites the `publishConfig.tag` setting in your | ||
> `package.json` file for you | ||
## Installation | ||
Install | ||
------------------------------------------------------------------------------- | ||
Add the following snippet to your `.travis.yml` file: | ||
``` | ||
npm install --global auto-dist-tag | ||
``` | ||
```yaml | ||
before_deploy: | ||
- npm install -g auto-dist-tag | ||
- auto-dist-tag --write | ||
Usage | ||
------------------------------------------------------------------------------- | ||
``` | ||
$ auto-dist-tag --help | ||
Usage | ||
$ auto-dist-tag [path] | ||
## Usage | ||
Options | ||
--write, -w Write calculated dist-tag to the package.json file | ||
``` | ||
@@ -27,3 +36,19 @@ `auto-dist-tag` will automatically figure out what the best `dist-tag` is based | ||
Have a look at our [tests](test/calc-dist-tag-test.js) to figure out what | ||
tags to expect as output. | ||
### Travis CI | ||
If you are using [Travis CI](https://docs.travis-ci.com/user/deployment/npm/) | ||
to automatically publish your package to npm you should add the following | ||
snippet to your `.travis.yml` file: | ||
```yaml | ||
before_deploy: | ||
- npm install -g auto-dist-tag | ||
- auto-dist-tag --write | ||
``` | ||
License | ||
@@ -30,0 +55,0 @@ ------------------------------------------------------------------------------- |
@@ -84,2 +84,13 @@ 'use strict'; | ||
// real world: ember-cli | ||
test('2.12.3', { latest: '2.12.2', beta: '2.13.0-beta.4' }, 'latest'); | ||
test('2.13.0', { latest: '2.12.3', beta: '2.13.0-beta.4' }, 'latest'); | ||
test('2.14.0-beta.1', { latest: '2.13.0', beta: '2.13.0-beta.4' }, 'beta'); | ||
// real world: ember-cli-eslint | ||
test('3.0.3', { latest: '3.0.2' }, 'latest'); | ||
test('3.1.0-beta.1', { latest: '3.0.3' }, 'beta'); | ||
test('3.1.0-beta.2', { latest: '3.0.3', beta: '3.1.0-beta.1' }, 'beta'); | ||
test('3.1.0', { latest: '3.0.3', beta: '3.1.0-beta.2' }, 'latest'); | ||
}); |
43020
153
57