From a3e7c211023ecbcc7fd666aea675628c599a8ef8 Mon Sep 17 00:00:00 2001 From: Temp Date: Sat, 30 Apr 2016 17:28:57 +0200 Subject: [PATCH] chore(releasing): Add conventional commit and semantic-release BREAKING CHANGE:change in json key name in response from name to item --- .travis.yml | 19 +++++++++++++++++-- package.json | 17 ++++++++++++----- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 80732d5..4d012ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,21 @@ +sudo: false language: node_js +cache: + directories: + - node_modules +notifications: + email: false node_js: - - "5" + - '4' +before_install: + - npm i -g npm@^2.0.0 +before_script: + - npm prune script: "npm run-script coverage" # Send coverage data to Coveralls -after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" +after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index 4bf6e76..62aa6e1 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,16 @@ { "name": "bkp", - "version": "2.0.0-dev", "description": "(Bounded) Knapsack problem", "main": "index.js", "scripts": { "test": "mocha test", - "coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*" + "coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "commit": "git-cz" }, "repository": { "type": "git", - "url": "git+https://github.com/lo-enterprise/bkp.git" + "url": "https://github.com/lo-enterprise/bkp.git" }, "keywords": [ "Bounded", @@ -26,8 +27,14 @@ }, "homepage": "https://github.com/lo-enterprise/bkp#readme", "devDependencies": { + "commitizen": "^2.8.1", "coveralls": "^2.11.9", + "cz-conventional-changelog": "^1.1.6", "istanbul": "^0.4.3", - "mocha": "^2.4.5" + "mocha": "^2.4.5", + "semantic-release": "^4.3.5" + }, + "czConfig": { + "path": "node_modules/cz-conventional-changelog" } -} +} \ No newline at end of file