Skip to content

Commit

Permalink
Build: switch to release script package
Browse files Browse the repository at this point in the history
  • Loading branch information
not-an-aardvark committed Jul 31, 2018
1 parent bc33780 commit 047dc8f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 106 deletions.
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Thanks for contributing!
```bash
git clone https://github.com/prettier/eslint-plugin-prettier.git
cd eslint-plugin-prettier
npm install
yarn # or `npm install`
```

## Running the tests
Expand All @@ -20,12 +20,16 @@ This is an [ESLint](http://eslint.org) plugin. Documentation for the APIs that i

This plugin is used to lint itself. The style is checked when `npm test` is run, and the build will fail if there are any linting errors. You can use `npm run lint -- --fix` to fix some linting errors. To run the tests without running the linter, you can use `node_modules/.bin/mocha`.

## Commit messages

Commit messages should start with one of the following prefixes: `Breaking:`, `New:`, `Update:`, `Fix:`, `Docs:`, `Build:`, `Upgrade:`, `Chore:`. These prefixes are automatically used to determine the release type when generating a release, as described [here](https://github.com/not-an-aardvark/node-release-script/tree/5f5ed3fdfbb584f2e940daab1e2ad948b186410a#what-does-it-do).

## Publishing

```bash
node build/release.js
npm run generate-release
git push --follow-tags
npm publish
```

`build/release.js` will generate a commit and tag like https://github.com/prettier/eslint-plugin-prettier/commit/56873bf2.
`npm run generate-release` will autogenerate a commit, changelog entry, and git tag like https://github.com/prettier/eslint-plugin-prettier/commit/56873bf2.
102 changes: 0 additions & 102 deletions build/release.js

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"main": "eslint-plugin-prettier.js",
"scripts": {
"lint": "eslint .",
"test": "npm run lint && mocha"
"test": "npm run lint && mocha",
"generate-release": "node-release-script"
},
"repository": {
"type": "git",
Expand All @@ -33,6 +34,7 @@
"prettier": ">= 0.11.0"
},
"devDependencies": {
"@not-an-aardvark/node-release-script": "^0.1.0",
"eslint": "^3.14.1",
"eslint-config-not-an-aardvark": "^2.0.0",
"eslint-config-prettier": "^1.3.0",
Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# yarn lockfile v1


"@not-an-aardvark/node-release-script@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@not-an-aardvark/node-release-script/-/node-release-script-0.1.0.tgz#bfd4426239365b0dba0a7e9934f365123e915b76"
dependencies:
moment "^2.18.1"
semver "^5.4.1"

acorn-jsx@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
Expand Down Expand Up @@ -876,6 +883,10 @@ [email protected], semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"

semver@^5.4.1:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"

shelljs@^0.7.5:
version "0.7.7"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
Expand Down

0 comments on commit 047dc8f

Please sign in to comment.