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

Commit

Permalink
Merge pull request #23 from krux/travis-release-master
Browse files Browse the repository at this point in the history
Implement semantic-release
  • Loading branch information
Seth Yates committed Apr 23, 2016
2 parents 93b4435 + ca2734f commit 16baad9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 42 deletions.
31 changes: 21 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,31 @@ sudo: false

language: node_js

cache:
directories:
- node_modules

notifications:
email: false

node_js:
- 5

before_script:
- npm run build
- npm run lint
- npm prune

script:
- npm run test:ci
- npm run test:cross-browser
- |
npm run lint
npm run build
npm run test:ci
if [ "${TRAVIS_PULL_REQUEST}" == "true" ]; then
npm run test:cross-browser
fi
notifications:
email:
recipients:
- seth.yates@krux.com
on_success: [change]
on_failure: [always]
after_success:
- npm run semantic-release

branches:
except:
- /^v\d+\.\d+\.\d+$/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Coverage](https://img.shields.io/coveralls/krux/prescribe.svg)](https://coveralls.io/github/krux/prescribe)
[![Dependencies](https://img.shields.io/david/dev/krux/prescribe.svg)](./package.json)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Tiny, forgiving HTML parser in JavaScript. This module started life as code from John Resig and
has evolved and morphed over the years of hardening and use in Krux's [postscribe](https://github.com/krux/postscribe)
Expand Down
28 changes: 0 additions & 28 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-env node */
import process from 'process';
import childProcess from 'child_process';
import gulp from 'gulp';
import pkg from './package.json';
import {Server as Karma} from 'karma';
import git from 'gulp-git';
import del from 'del';
import gutil from 'gulp-util';
import rename from 'gulp-rename';
Expand Down Expand Up @@ -147,29 +145,3 @@ gulp.task('tdd', ['test:nocoverage'], () => {
gulp.task('tdd:coverage', ['test:coverage'], () => {
gulp.watch(['src/**', 'test/**'], ['test:coverage']);
});

gulp.task('release', ['build', 'doc'], done => {
git.exec({args: `tag v${pkg.version}`}, err => {
if (err) {
throw err;
}

git.exec({args: 'push origin master --tags'}, err => {
if (err) {
throw err;
}

childProcess.exec('npm publish', (err, stdout, stderr) => {
gutil.log('[release]', `stdout: ${stdout}`);
gutil.log('[release]', `stderr: ${stderr}`);

if (err) {
throw err;
}

done();
});
});
});
});

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "prescribe",
"version": "1.0.5",
"description": "Tiny, forgiving HTML parser",
"homepage": "https://github.com/krux/prescribe/",
"bugs": "https://github.com/krux/prescribe/issues",
Expand Down Expand Up @@ -71,7 +70,7 @@
"clean": "gulp clean",
"doc": "gulp doc",
"lint": "gulp lint",
"release": "gulp clean && gulp build && gulp release",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"start": "gulp serve",
"tdd": "gulp tdd",
"tdd:coverage": "gulp tdd:coverage",
Expand All @@ -93,7 +92,7 @@
"babel-preset-es2015-loose": "7.0.0",
"babel-register": "6.7.2",
"babelify": "7.2.0",
"cz-conventional-changelog": "1.1.6",
"cz-conventional-changelog": "1.1.5",
"del": "2.2.0",
"eslint": "2.8.0",
"expect.js": "0.3.1",
Expand All @@ -102,7 +101,6 @@
"gulp-esdoc": "0.2.0",
"gulp-eslint": "2.0.0",
"gulp-filter": "4.0.0",
"gulp-git": "1.7.1",
"gulp-header": "1.7.1",
"gulp-jscs": "3.0.2",
"gulp-rename": "1.2.2",
Expand Down Expand Up @@ -132,6 +130,7 @@
"mocha": "2.4.5",
"phantomjs-prebuilt": "2.1.7",
"process": "0.11.2",
"semantic-release": "^4.3.5",
"sinon": "1.17.3",
"watchify": "3.7.0",
"webpack": "1.13.0",
Expand Down

0 comments on commit 16baad9

Please sign in to comment.