vojtajina / grunt-bump

Grunt.js plugin - Increment package version.
MIT License
651 stars 122 forks source link

globalReplace option seems non effective #182

Closed andreasciamanna closed 8 years ago

andreasciamanna commented 8 years ago

I have this configuration:

this.grunt.initConfig({
    pkg:  this.grunt.file.readJSON('package.json'),
    bump: {
        options: {
            files:         ['../myfile.php'],
            commit:        false,
            createTag:     false,
            push:          false,
            globalReplace: true,
            prereleaseName: 'rc'
        }
    }
});

When running grunt bump:prerelease, only the first occurrence of the file gets changed.

For instance, if the files begins as such:

/*
Plugin Name: My Plugins
Author: Me
Version: 3.3.8-rc.1

3.3.8-rc.1
*/

Only what's after "Version:" gets bumped.

eddiemonge commented 8 years ago

Probably because the regex for the second one doesnt match since it isn't prefixed with version