The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Group::Git::Examples - Some example usage of group-git

VERSION

This documentation refers to Group::Git::Examples version 0.6.10

EXAMPLES

Pulling all managed repositories

What I imagine will be the most common use case, pulling all repositories:

    $ group-git pull

Supports all (or most?) of git's pull options eg

    $ group-git pull --ff -r

As many repositories may not change you can use the --quiet parameter to suppress the output from repositories with out any changes:

    $ group-git pull --quiet
    # or short hand
    $ group-git pull -q

Repository Tags

Repository tags can be specified in 3 different:

  • Automatically : The Group::Git::Github and Group::Git::Stash plugins both generate tags and by modules under Group::Git::Taggers::*.

  • In the group-git.yml you can also specify tags

        ---
        # other options
        tags:
            mytag:
                - repo1
                - repo2
            other:
                - repo1
                - repo3
  • The final way is in the repositories them selves add a file in the root in the format .{tag}.tag

Tags can be used to include only repositories that match:

    $ group-git --tag mytag pull
    # or short hand
    $ group-git -t mytag pull

Note: that the tag must be specified before the command to execute

Running scripts

With the sh command you can run scripts in each repository if you need to perform as systematic task. You can also use this command to just enter a bash prompt for each repository:

    $ group-git sh bash

Run tests in each repository?

    # Perl module build?
    $ group-git sh './Build test'
    # Perl distzilla
    $ group-git sh 'dzil test'
    # Maven test?
    $ group-git sh 'mvn clean test'
    # Node with gulp?
    $ group-git sh 'gulp test'
    # Have a mixed environment?
    $ group-git sh 'if [ -e 'Build' ]; then ./Build test; else gulp test; fi'

CONFIGURATION

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2015 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.