Giter Site home page Giter Site logo

Comments (8)

stephenlacy avatar stephenlacy commented on August 20, 2024

Why would the flush function not get called?
Does the console show the git command getting executed?

from gulp-git.

LarryBattle avatar LarryBattle commented on August 20, 2024

Here's sample code.

Environment setup.

git clone https://github.com/stevelacy/gulp-git.git
cd gulp-git
echo "test" > new_file.txt
git add . -A
git commit -m "Added new file"
npm install

gulp-git/gulpfile.js

var gulp = require('gulp');
var git = require('gulp-git');

gulp.task('push', function(){
  console.log("Calling git.push()");
  git.push('origin', 'master', function (err) {
    console.log("In callback of git.push()");
    if (err) throw err;
    console.log("done");
  });
});

gulp.task('default',['push']);

Output

C:\gulp-git>gulp
[23:26:42] Using gulpfile gulp-git\gulpfile.js
[23:26:42] Starting 'push'...
Calling git.push()
[23:26:42] Finished 'push' after 821 μs
[23:26:42] Starting 'default'...
[23:26:42] Finished 'default' after 6.16 μs

As you can see, the callback for git.push() isn't called.

from gulp-git.

sparty02 avatar sparty02 commented on August 20, 2024

I'm experiencing the same issue. My use case was trying to push a tag from my gulp build, but essentially I'm encountering the same problem as @LarryBattle .

from gulp-git.

stephenlacy avatar stephenlacy commented on August 20, 2024

Just fixed push.js, it appears that I did not change it fully from the older requirement of gulp.src.

from gulp-git.

stephenlacy avatar stephenlacy commented on August 20, 2024

@LarryBattle can you pull from master and confirm the fix works for you?

from gulp-git.

LarryBattle avatar LarryBattle commented on August 20, 2024

@stevelacy It works now. Thanks!
For the other lib files, I recommend removing through.obj(write, flush) and just returning exec(). MUCH easier to understand.

from gulp-git.

stephenlacy avatar stephenlacy commented on August 20, 2024

@LarryBattle I'll do it to the ones which don't require a stream, if you want you can open issues for each one to remind me.

from gulp-git.

stephenlacy avatar stephenlacy commented on August 20, 2024

Published to 0.5.3, thanks

from gulp-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.