Skip to content

Commit 1e471b7

Browse files
chore(ci): semantic release to NPM
1 parent a918486 commit 1e471b7

File tree

5 files changed

+11
-31
lines changed

5 files changed

+11
-31
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ script:
1818

1919
after_success:
2020
# - gulp coverage
21-
# - npm run semantic-release
21+
- npm run semantic-release
2222

2323
branches:
2424
except:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The [change log](https://github.com/richardschneider/cardsJS/releases) is automatically produced with
2+
the help of [semantic-release](https://github.com/semantic-release/semantic-release).

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# cardsJS
22

33
[![Travis build status](https://travis-ci.org/richardschneider/cardsJS.svg)](https://travis-ci.org/richardschneider/cardsJS)
4+
[![npm version](https://badge.fury.io/js/cardsJS.svg)](https://badge.fury.io/js/cardsJS)
45

56
Showing playing cards that are scalable in a browser is possible with cardJS. See the [web site](http://richardschneider.github.io/cardsJS) for some examples and the [wiki](https://github.com/richardschneider/cardsJS/wiki) for documentation.
67

78
I'm using the [Vectorized Playing Cards 1.3](http://code.google.com/p/vectorized-playing-cards/) designed by Chris Aguilar, see the [readme file](cards/readme.txt) for the details. The original SVGs are changed to *not* render in an A4 page, but to fit to size.
89

10+
The [change log](https://github.com/richardschneider/cardsJS/releases) is automatically produced with
11+
the help of [semantic-release](https://github.com/semantic-release/semantic-release).
12+
913
## Cards
1014

1115
Use the `<img class='card' src='cards/id.svg'>` HTML tag; where *id* is the identifier of the card. The *id* is composed of the rank and then the suit of the card,

gulpfile.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
var gulp = require('gulp');
44
var jshint = require('gulp-jshint');
55
var plugins = require('gulp-load-plugins')();
6-
var browserify = require('browserify');
76
var cssnano = require('gulp-cssnano');
87
var svgmin = require('gulp-svgmin');
9-
var tag_version = require('gulp-tag-version');
108
var uglify = require('gulp-uglify');
119
var buffer = require('vinyl-buffer');
1210
var rename = require('gulp-rename');
@@ -50,27 +48,6 @@ gulp.task('istanbul', function (cb) {
5048
});
5149
});
5250

53-
gulp.task('bump', ['test'], function () {
54-
var bumpType = plugins.util.env.type || 'patch'; // major.minor.patch
55-
56-
return gulp.src(['./package.json', './bower.json'])
57-
.pipe(plugins.bump({ type: bumpType }))
58-
.pipe(gulp.dest('./'))
59-
.pipe(plugins.git.add())
60-
.pipe(plugins.git.commit('new release'))
61-
.pipe(plugins.filter('package.json'))
62-
.pipe(tag_version());
63-
});
64-
65-
gulp.task('release', ['bump'], function (cb) {
66-
return plugins.git.push('origin', 'master', {args: '--tags'}, function (err) {
67-
if (err) {
68-
throw err;
69-
}
70-
cb();
71-
});
72-
});
73-
7451
gulp.task('dist', function() {
7552
gulp.src(paths.source)
7653
.pipe(gulp.dest('./dist'))
@@ -93,5 +70,5 @@ gulp.task('dist', function() {
9370
});
9471

9572
gulp.task('test', ['lint', 'istanbul']);
96-
gulp.task('ci', ['test', 'dist'])
73+
gulp.task('ci', ['test', 'dist']);
9774
gulp.task('default', ['test']);

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "cardsJS",
33
"description": "Scalable playing cards with various hand layouts.",
4-
"version": "0.0.7",
54
"homepage": "http://richardschneider.github.io/cardsJS/",
65
"bugs": "https://github.com/richardschneider/cardsJS/issues",
76
"license": "MIT",
@@ -25,28 +24,26 @@
2524
"jquery": "~2.1.3"
2625
},
2726
"devDependencies": {
28-
"browserify": "9.0.1",
2927
"chai": "^2.2.0",
3028
"gulp": "^3.8.8",
3129
"gulp-bump": "^0.1.11",
3230
"gulp-cssnano": "^2.1.2",
3331
"gulp-filter": "^2.0.2",
34-
"gulp-git": "^1.1.0",
3532
"gulp-istanbul": "^0.5.0",
3633
"gulp-jshint": "^1.8.4",
3734
"gulp-load-plugins": "^0.6.0",
3835
"gulp-mocha": "^1.1.0",
3936
"gulp-plumber": "^0.6.5",
4037
"gulp-rename": "^1.2.2",
4138
"gulp-svgmin": "^1.2.3",
42-
"gulp-tag-version": "^1.2.1",
4339
"gulp-uglify": "^1.5.4",
44-
"gulp-util": "^3.0.1",
4540
"jshint-stylish": "^0.4.0",
41+
"semantic-release": "^4.3.5",
4642
"should": "*",
4743
"vinyl-buffer": "^1.0.0"
4844
},
4945
"scripts": {
50-
"test": "gulp test"
46+
"test": "gulp test",
47+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
5148
}
5249
}

0 commit comments

Comments
 (0)