git-up-to-date - Check that git branches include latest production branch/tag
This documentation refers to git-up-to-date version 1.0.6
git-up-to-date [am-i] [option] git-up-to-date show [option] git-up-to-date current [option] git-up-to-date update-me [option] SUB-COMMANDS am-i (default) determine if the current branch is up-to-date show Show's the status of all active branches (ie branches with commits since last release) current Show the current "production" branch or tag update-me Merges in the latest release OPTIONS: -t --tab[=]str Specify a tag that any branch with newer commits must contain -b --branch[=]str Similarly a branch that other branches with newer commits must contain (Default origin/master) -l --local Shorthand for --branch '^master$' -f --format[=](test|text|html|csv|tab|json) Set the out put format * test - TAP test formatted output (default) * text - Simple formatted text * html - A basic HTML page * csv - Comma seperated values formatted output * tab - Tab seperated values formatted output -q --quick Print to STDERR the statuses as they are found (no formatting) -i --include[=]regexp Include only "neweer" branches that match this regexp -e --exclude[=]regexp Exclude any "neweer" branches that match this regexp --all Show the status of all branches not just current ones. -m --max-history[=]int Set the maximum number of release branches/tags to go back (if more than one) to find where a branch was created from. (Default 1) -s --branch-status Shows the status (name, last committer, last commit date) of all branches. -a --age-limit[=]date With --branch-status limit to only branches created after date (a YYYY-MM-DD formatted date) -F --fetch Do a fetch before anything else. -x --fix With am-i, merges in the current prod/release branch/tag -v --verbose Shows changed branches that are upto date. --version Prints the version information --help Prints this help information --man Prints the full documentation for git-up-to-date
The git up-to-date command can tell you the status of "active" branches as compared to a release tag or branch. It does this by finding all tags or branches that match the regular expression passed to --tag or --branch, sorts them alpha-numerically assuming that the largest is the most recent.
git up-to-date
--tag
--branch
eg release_1, release_1_1
The branch release_1_1 would be considered the most recent. With the found tag/branch the date/time it was created is used to find all branches that have newer commits (unless --all is used). These branches are then searched to see if they contain the found release tag or branch (and if --max-history is specified and the branch doesn't contain the release branch or tag the older releases are searched for).
--all
--max-history
run ()
Executes the git workflow command
do_show ()
do_am_i ()
do_current ()
do_update_me ()
branches_contain ()
format_text ()
format_csv ()
format_json ()
format_html ()
format_test ()
format_tab ()
Defaults for this script can be set through git config
git config
workflow.prod Sets how a prod release is determined eg the default equivalent is branch=^origin/master$ workflow.max-history Sets the default C<--max-history> value
You can set these values either by editing the repository local .git/config file or ~/.gitconfig or use the git config command
.git/config
~/.gitconfig
# eg Setting the global value git config --global workflow.max-history 10 # or set a repository's local value git config workflow.prod 'tag=^release_\d{4}_\d{2}\d{2}$'
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gmail.com)
Copyright (c) 2014 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.
To install App::Git::Workflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Git::Workflow
CPAN shell
perl -MCPAN -e shell install App::Git::Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.