Skip to content

Multiple commands on the same hook overwrite each other #39

@morganestes

Description

@morganestes

With v0.3.1: I've tried to add multiple commands to a single hook, but they get overwritten and only the last one survives. Specifically, I'm trying to get npm, Composer, and Bower to all update on the same hook, then have Grunt run, but each one overwrites the hook file and I'm only left with the Grunt command.

Here's an example of what I'm trying to do:

githooks: {
    'all': {
        'pre-commit': 'css js'
    },
    'dev.composer': {
        'post-merge': {
            command: 'composer',
            taskNames: 'update'
        },
        'post-checkout': {
            command: 'composer',
            taskNames: 'update'
        }
    },
    'dev.node': {
        'post-merge': {
            command: 'npm',
            taskNames: 'update'
        },
        'post-checkout': {
            command: 'npm',
            taskNames: 'update'
        }
    },
    'dev.bower': {
        'post-merge': {
            command: 'bower',
            taskNames: 'install update'
        },
        'post-checkout': {
            command: 'bower',
            taskNames: 'install update'
        }
    },
    'dev.grunt': {
        'post-merge': 'default',
        'post-checkout': 'default'
    }
},

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions