Skip to content

Commit 827282e

Browse files
committed
Prepare for release
1 parent 38e57a4 commit 827282e

File tree

6 files changed

+27
-12
lines changed

6 files changed

+27
-12
lines changed

.npmignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

gulpfile.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import './tasks/build';
33
import './tasks/clean';
44
import './tasks/connect';
5-
import './tasks/default';
65
import './tasks/dist';
6+
import './tasks/default';
77
import './tasks/lint';
88
import './tasks/release';
99
import './tasks/run';

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-input-range",
33
"version": "0.1.0",
4-
"description": "",
4+
"description": "React component for inputting numeric values within a range",
55
"keywords": [
66
"react",
77
"react-component",
@@ -35,6 +35,7 @@
3535
"gulp-concat": "^2.6.0",
3636
"gulp-connect": "^2.2.0",
3737
"gulp-eslint": "^0.15.0",
38+
"gulp-git": "^1.4.0",
3839
"gulp-minify-css": "^1.2.0",
3940
"gulp-postcss": "^6.0.0",
4041
"gulp-prompt": "^0.1.2",
@@ -62,6 +63,11 @@
6263
"peerDependencies": {
6364
"react": "^0.13.3"
6465
},
66+
"files": [
67+
"dist/",
68+
"LICENSE",
69+
"README.md"
70+
],
6571
"scripts": {
6672
"build": "gulp build",
6773
"release": "gulp release",

tasks/build.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ gulp.task('build', [
44
'script',
55
'style',
66
]);
7+
8+
gulp.task('build:dist', [
9+
'script:dist',
10+
'style:dist',
11+
]);

tasks/dist.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ import gulp from 'gulp';
22

33
gulp.task('dist', [
44
'clean:dist',
5-
'build',
6-
'style:dist',
7-
'script:dist',
5+
'build:dist',
86
]);

tasks/release.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import gulp from 'gulp';
22
import gutil from 'gulp-util';
33
import bump from 'gulp-bump';
44
import prompt from 'gulp-prompt';
5+
import git from 'gulp-git';
56
import semver from 'semver';
67
import runSequence from 'run-sequence';
78
import config from './config';
89

9-
let newVersion;
10+
let newVersion = config.version;
1011

1112
gulp.task('release', (callback) => {
12-
runSequence('releasePrompt', 'releaseBump', 'dist', callback);
13+
runSequence('releasePrompt', 'dist', 'releaseBump', 'releaseTag', callback);
1314
});
1415

1516
gulp.task('releasePrompt', () => {
@@ -33,12 +34,21 @@ gulp.task('releasePrompt', () => {
3334
],
3435
};
3536

36-
return gulp.src(config.release.src, { read: false })
37+
return gulp.src('./', { read: false })
3738
.pipe(prompt.prompt(promptConfig, (response) => {
3839
newVersion = semver.inc(config.version, response.releaseType);
3940
}));
4041
});
4142

43+
gulp.task('releaseTag', () => {
44+
const message = `Release v${newVersion}`;
45+
const tag = `v${newVersion}`;
46+
47+
return gulp.src('./')
48+
.pipe(git.commit(message, { args: '-a' }))
49+
.pipe(git.tag(tag, message));
50+
});
51+
4252
gulp.task('releaseBump', () => {
4353
return gulp.src(config.release.src)
4454
.pipe(bump({ version: newVersion }))

0 commit comments

Comments
 (0)