Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Gulp callback fired too early #10

Open
klausbayrhammer opened this issue Jul 24, 2015 · 1 comment
Open

Gulp callback fired too early #10

klausbayrhammer opened this issue Jul 24, 2015 · 1 comment

Comments

@klausbayrhammer
Copy link
Contributor

As discussed in #8

gulp.task('deploy', function(){
  gulp.src(['./package.json'])
    .pipe(bump({type:'patch'}))
    .pipe(gulp.dest('./'))
    .pipe(git.commit('bumps package version'))
    .pipe(filter('package.json'))
    .pipe(tag_version())

    .pipe(git.push('origin', 'master', {args: " --tags"}, function (err) {
      if (err) throw err;
    }));
});

When I execute the deploy tasks it seems like there is some kind of race condition because sometimes the git push origin master --tags pushes the commit with the version bump but misses the tag.

I suspect the gulp callback is fired too early. You could try chaning the lines git.tag(tag, label, opts); cb(null, file) to git.tag(tag, label, opts, cb) so the gulp-callback is triggered when the tagging is done.

klausbayrhammer added a commit to klausbayrhammer/gulp-tag-version that referenced this issue Jul 25, 2015
moves gulp callback to git.tag so it is fired after tagging is finished
ikari-pl added a commit that referenced this issue Aug 15, 2015
@Dan503
Copy link

Dan503 commented Mar 14, 2017

Can this please be merged into master and released onto npm?

It doesn't seem to be fixed in the official release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants