Skip to content

Commit

Permalink
setting up semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Nov 30, 2015
1 parent f7b72f7 commit 60f4042
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 10 deletions.
27 changes: 19 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
language: node_js
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "0.12"
- "4"
- "5"
branches:
only:
- master
- '5'
- '4'
- '0.12'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm install -g grunt-cli
- npm prune
after_success:
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
- python travis_after_all.py
- 'export $(cat .to_export_back) &> /dev/null'
- npm run coveralls
- npm run semantic-release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# next-update v0.9.5
# next-update v0.0.0-semantic-release

> Tests if module's dependencies can be updated to the newer version without breaking the tests
Expand All @@ -9,6 +9,7 @@
[![Coverage Status][next-update-coverage-image] ][next-update-coverage-url]
[![dependencies][next-update-dependencies-image] ][next-update-dependencies-url]
[![devdependencies][next-update-devdependencies-image] ][next-update-devdependencies-url]
[![semantic-release][semantic-image] ][semantic-url]

[next-update-icon]: https://nodei.co/npm/next-update.png?downloads=true
[next-update-url]: https://npmjs.org/package/next-update
Expand All @@ -22,6 +23,8 @@
[next-update-devdependencies-url]: https://david-dm.org/bahmutov/next-update#info=devDependencies
[circle-ci-image]: https://circleci.com/gh/bahmutov/next-update.svg?style=svg
[circle-ci-url]: https://circleci.com/gh/bahmutov/next-update
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release



Expand Down
3 changes: 3 additions & 0 deletions docs/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Coverage Status][next-update-coverage-image] ][next-update-coverage-url]
[![dependencies][next-update-dependencies-image] ][next-update-dependencies-url]
[![devdependencies][next-update-devdependencies-image] ][next-update-devdependencies-url]
[![semantic-release][semantic-image] ][semantic-url]

[next-update-icon]: https://nodei.co/npm/next-update.png?downloads=true
[next-update-url]: https://npmjs.org/package/next-update
Expand All @@ -18,3 +19,5 @@
[next-update-devdependencies-url]: https://david-dm.org/bahmutov/next-update#info=devDependencies
[circle-ci-image]: https://circleci.com/gh/bahmutov/next-update.svg?style=svg
[circle-ci-url]: https://circleci.com/gh/bahmutov/next-update
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "next-update",
"description": "Tests if module's dependencies can be updated to the newer version without breaking the tests",
"version": "0.9.5",
"version": "0.0.0-semantic-release",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
"bin": {
"next-update": "./bin/next-update.js"
Expand Down Expand Up @@ -65,6 +65,7 @@
"mockery": "1.4.0",
"pre-git": "1.4.0",
"publish": "0.5.0",
"semantic-release": "4.3.5",
"time-grunt": "1.2.1"
},
"engines": {
Expand Down Expand Up @@ -98,6 +99,7 @@
"issues": "git-issues",
"limited": "gt --filter 'allow major' --output src/test/*.coffee",
"self-update": "node bin/next-update.js -k true",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "npm run build && npm run unit && npm run e2e",
"unit": "gt src/test/*.js src/test/*.coffee --output"
}
Expand Down
22 changes: 22 additions & 0 deletions src/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ function printTable(options, nameVersionPairs) {
}));
}

function getSkippedModules(packageFilename) {
var pkg = require(packageFilename);
var config = pkg &&
pkg.config &&
pkg.config['next-update'];
if (config) {
return config.skip ||
config.skipped ||
config.lock ||
config.locked ||
config.ignore ||
config.ignored ||
[];
}
return [];
}

function getDependenciesToCheck(options, moduleNames) {
check.verify.object(options, 'missing options');

Expand All @@ -63,6 +80,11 @@ function getDependenciesToCheck(options, moduleNames) {
var packageFilename = path.join(workingDirectory, 'package.json');
var nameVersionPairs = getKnownDependencies(packageFilename);

var skipModules = getSkippedModules(packageFilename);
check.verify.array(skipModules, 'expected list of skipped modules');
if (skipModules.length && !options.tldr) {
console.log('ignoring the following modules', skipModules.join(', '));
}
printTable(options, nameVersionPairs);

var toCheck = nameVersionPairs;
Expand Down

0 comments on commit 60f4042

Please sign in to comment.