Skip to content

Commit

Permalink
Gulp: Cleanup publish task.
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Jul 9, 2016
1 parent 3a7c0f5 commit 6154b44
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gulp/tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ gulp.task('publish', function() {
});

gulp.task('publish:version', function() {
// Since we're executing this on the develop branch but we don't wan the
// version suffixed, reset the version value again.
// reset the version value since we're executing this on the develop branch,
// but we don't wan the published version suffixed with '-develop'.
options.resetVersion();
return gulp.src([ 'package.json', 'component.json' ])
.pipe(bump({ version: options.version }))
Expand All @@ -44,6 +44,7 @@ gulp.task('publish:dist', ['dist']);
gulp.task('publish:commit', function() {
var message = 'Release version ' + options.version;
return gulp.src('.')
.pipe(git.checkout('develop'))
.pipe(git.add())
.pipe(git.commit(message))
.pipe(git.tag('v' + options.version, message));
Expand All @@ -54,12 +55,12 @@ gulp.task('publish:release', function() {
.pipe(git.checkout('master'))
.pipe(git.merge('develop', { args: '-X theirs' }))
.pipe(git.push('origin', ['master', 'develop'], { args: '--tags' }))
.pipe(shell('npm publish'))
.pipe(git.checkout('develop'));
.pipe(shell('npm publish'));
});

gulp.task('publish:load', ['load'], function() {
return gulp.src('dist')
.pipe(git.checkout('develop'))
.pipe(git.add())
.pipe(git.commit('Switch back to load.js versions on develop branch.'))
.pipe(git.push('origin', 'develop'));
Expand Down

0 comments on commit 6154b44

Please sign in to comment.