Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
chore: add release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hmdhk committed Apr 5, 2017
1 parent 98aaed1 commit 95fbecd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Use `npm run karma` to continuously run unit tests during development.

Use `npm test` to run both unit tests and e2e tests.

## Making a release

Use `npm run prepare-patch` or `npm run prepare-minor` to prepare and publish a release.
Note that you should NOT make a new commit for the release it will be done in the preparation process.

## License
MIT
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
],
"main": "src/index.js",
"scripts": {
"prepare-patch": "sh ./scripts/prepare-release patch",
"prepare-minor": "sh ./scripts/prepare-release minor",
"prepare-patch": "sh ./scripts/prepare-release patch && npm run push-release",
"prepare-minor": "sh ./scripts/prepare-release minor && npm run push-release",
"push-release": "git push origin master --follow-tags && npm publish",
"build": "gulp build:release",
"karma": "node node_modules/karma/bin/karma start",
"karma-coverage": "node node_modules/karma/bin/karma start --coverage",
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-release
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
# set -e

if [[ $# -lt 1 || "$1" != "patch" && "$1" != "minor" ]];
then
Expand Down

0 comments on commit 95fbecd

Please sign in to comment.