You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-35Lines changed: 20 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,52 +18,43 @@ You can install the ESLint release tool using [npm](https://npmjs.com):
18
18
$ npm install eslint-release --save-dev
19
19
```
20
20
21
-
## Local Usage
21
+
## Usage
22
22
23
-
The ESLint release tool is designed to be used on the command line and has two modes: regular release and prerelease.
23
+
To start, you'll need to define two environment variables:
24
24
25
-
To run a regular release:
25
+
*`NPM_TOKEN` - a token to use for `npm publish`. The token must be from a user that has permission to publish the package.
26
+
*`ESLINT_GITHUB_TOKEN` - a token for a GitHub user that has `repo` permission (used for posting release notes).
26
27
27
-
```
28
-
$ eslint-release
29
-
```
28
+
The ESLint release tool is designed to be used on the command line and is divided into two phases: package generation and package publishing.
30
29
31
-
To run a prerelease, you need to include the prerelease identifier:
30
+
To generate a regular release:
32
31
33
32
```
34
-
$ eslint-prerelease alpha
33
+
$ eslint-generate-release
35
34
```
36
35
37
-
You can optionally include the release tool in another Node.js script:
36
+
To generate a prerelease, you need to include the prerelease identifier:
38
37
39
-
```js
40
-
var ReleaseOps =require("eslint-release");
38
+
```
39
+
$ eslint-generate-prerelease alpha
41
40
```
42
41
43
-
## CI Usage
44
-
45
-
When run in a CI environment like Jenkins, the ESLint release tool has different commands that allow for incorporation into more complex release scripts. To start, you'll need to define two environment variables:
46
-
47
-
*`NPM_TOKEN` - a token to use for `npm publish`. The token must be from a user that has permission to publish the package.
48
-
*`ESLINT_GITHUB_TOKEN` - a token for a GitHub user that has `repo` permission (used for posting release notes).
42
+
Both `eslint-generate-release` and `eslint-generate-prerelease` generate a new version and update the changelog but will not push back to GitHub or publish to npm. It will generate an npm package and a `.eslint-release-info.json` file.
49
43
50
-
To run a release in a CI environment:
44
+
For both releases and prereleases, you can then publish the release:
51
45
52
46
```
53
-
$ eslint-ci-release
47
+
$ eslint-publish-release
54
48
```
55
49
56
-
This will generate a new version, update the changelog, and publish to npm but will not push back to GitHub. It will also generate a `.releaseInfo.json` file.
57
-
58
-
Your CI system must manually push the repository changes to GitHub (including the version tag). After that, you can publish release notes by running:
50
+
This command publishes the generate npm package and pushes the changes to GitHub. The `.eslint-release-info.json` file is required for this step to work correctly.
59
51
60
-
```
61
-
$ eslint-gh-release
62
-
```
63
52
64
-
This command looks for the `.releaseInfo.json` file and uses that information to determine where to post release notes and what to post.
53
+
You can optionally include the release tool in another Node.js script:
65
54
66
-
**Note:** In Jenkins, `eslint-gh-release` must be run as the last step in the build (typically in a post-build script that occurs after the GitHub repository has been updated).
55
+
```js
56
+
var ReleaseOps =require("eslint-release");
57
+
```
67
58
68
59
## What It Does
69
60
@@ -82,23 +73,17 @@ When you run the release tool for a regular release, the following steps take pl
82
73
83
74
When you do a prerelease, the same steps are taken except that package is published to npm under the `next` tag instead of `latest`.
84
75
85
-
## Team
86
-
87
-
These folks keep the project moving and are resources for help:
88
-
89
-
* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead
90
-
91
76
## Contributing
92
77
93
-
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-release/issues).
78
+
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](https://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-release/issues).
0 commit comments