Skip to content

Commit

Permalink
[added] instruction and introduction into readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKVal committed Jul 10, 2015
1 parent 8e677a1 commit c2dee37
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,53 @@
# release-script
release tools for npm and bower packages

Release tool for npm and bower packages.

Initial idea is from `React-Bootstrap` release tools `./tools/release`,
that have been written by [Matt Smith @mtscout6](https://github.com/mtscout6)

#### This script does these steps:

- ensures that git repo has no pending changes
- ensures that git repo last version is fetched
- checks linting and tests by running `npm run test` command
- does version bump, with `preid` if it is requested
- builds all by `npm run build` command
- generates changelog using `mt-changelog`
- adds and commits changed `CHANGELOG.md` and `package.json` files to git repo
- adds git tag with changelog message and new version
- pushes changes to github repo
- releases npm package by `npm publish` command
- if `bowerRepo` field is present in the `package.json`, then it releases bower package:
- clones bower repo to local `tmpBowerRepo` temp folder. `git clone bowerRepo tmpBowerRepo`
- By default it is named `tmp-bower-repo`
- It is possible to set a custom `tmpBowerRepo` field in the `package.json`
- then it cleans up all but `.git` files in the `tmpBowerRepo`
- then copies all files from `bowerRoot` to `tmpBowerRepo`
- (that has to be generated with `npm run build`)
- `bowerRoot` also can be set to a custom value in the `package.json`
- then by `git add -A .` adds all bower distr files to the temporary git repo
- commits, tags and pushes the same as for the `npm` package.
- then deletes the `tmpBowerRepo` folder

## Installation

```sh
> npm install -D release-script
```

Set `bowerRepo` in your `package.json` if you need `bower` releases too.
```js
"bowerRepo": "[email protected]:<org-author-name>/<name-of-project>-bower.git",
```

Then you can release like that:
```sh
> release patch
> release minor --preid alpha
```

You can use `--dry-run` option to check first what will be done and if it is OK.
```sh
> release major --dry-run --verbose
```
This option prevents from running `danger` steps. (`git push`, `npm publish` etc)

0 comments on commit c2dee37

Please sign in to comment.