grunt-release icon indicating copy to clipboard operation
grunt-release copied to clipboard

Committing files generated by `beforeBump` task

Open gxxcastillo opened this issue 9 years ago • 5 comments

beforeBump runs a build script in my library which generates 3 files. However, the 3 files are not being added to my commit. Is this expected behavior?

This is my config:

release: {
            options: {
                file: 'bower.json',
                additionalFiles: ['package.json'],
                beforeBump: ['build'],
                npm: false,
                npmtag: false
            }
}

gxxcastillo avatar Nov 30 '15 18:11 gxxcastillo

hmmm... looks like this was intentional?

    function add(){
      var files = config.files.join(' ');
      grunt.log.ok('files:' + files);
      return run('git add ' + files, ' staged ' + files);
    }

Any reason we wouldn't want to do a git add . --all?

Should there be an addAll config option?

gxxcastillo avatar Nov 30 '15 18:11 gxxcastillo

:+1: There no point to change your files before Release or bump if you are not commiting it.

ritz078 avatar Jan 04 '16 05:01 ritz078

+1

Klortho avatar Mar 07 '16 04:03 Klortho

Or maybe alter the "add" command syntax to allow a list of files to be added... it would be even more intuitive. What's the point of the current "add" command? To add to the repository the package-lock or the changelog if they never existed before? How often does it happen?

bago avatar Mar 01 '18 08:03 bago

I have a similar case where my build script needs to change some files. These files need to be committed also.

blendsdk avatar Jul 11 '18 09:07 blendsdk