Test::BrewBuild::Git - Git repository manager for the Test::BrewBuild test platform system.
Test::BrewBuild
use Test::BrewBuild::Git; my $git = Test::BrewBuild::Git->new; my $repo_link = $git->link; my $repo_name = $git->name($link); $git->clone($repo_link); $git->pull;
Manages Git repositories, including gathering names, cloning, pulling etc.
Returns a new Test::BrewBuild::Git object.
Test::BrewBuild::Git
Parameters:
debug => $level
Optional, Integer. $level vary between 0-7, 0 being the least verbose.
Returns the git command for the local platform.
git
Fetches and returns the full link to the master repository from your current working directory. This is the link you used to originally clone the repo.
Extracts the repo name from the full link path.
Clones the repo into the current working directory.
While in a repository directory, pull down any updates.
Returns the current commit SHA1 for a repo, with ability to get the local commit or remote commit SHA1 sum.
All parameters are passed in as a hash.
repo
Optional, string. The Github url to the repo. If not sent in, we will attempt to get this information from the current working directory. Mandatory if the remote parameter is sent in.
remote
Optional, bool. If sent in, we'll fetch the current commit's SHA1 sum from Github itself, else we'll get the sum from the most recent local, unpushed commit. The repo parameter is mandatory if this one is sent in.
Returns true of the repo we're working on is behind or equal to the remote regarding commits, and false if we're ahead.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2017 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Test::BrewBuild, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::BrewBuild
CPAN shell
perl -MCPAN -e shell install Test::BrewBuild
For more information on module installation, please visit the detailed CPAN module installation guide.