#!/usr/bin/perl -w

use strict;
use warnings;
use Pod::Usage;
use Getopt::Long;
use Gear::Remotes::Watch;

my $default_action='gear-uupdate';
my $action;
my $verbose=1;
my ($help);

my $result = GetOptions (
    'verbose+' => \$verbose,
    'q|quiet'  => sub {$verbose=0},
    'h|help'   => \$help,
    'action=s'   => \$action,
    );

pod2usage(-verbose => 2) if $help;

&Gear::Remotes::Watch::watch_remotes(
    -action => $action,
    -verbose => $verbose,
    );

=head1	NAME

gear-remotes-watch - check for updates in git repo listed in .gear/upstream/remotes file

=head1	SYNOPSIS

B<gear-remotes-watch>

=head1	DESCRIPTION

B<gear-remotes-watch> checks for updates in foreign upstream git repository(ies) 
listed in I<.gear/upstream/remotes> file. For that B<gear-remotes-watch>
lists tags available in upstream git repository and compares them with the current
version in spec file. If a tag with greater version is found, notification is
issued. 

B<gear-remotes-watch> uses the following auxiliary scripts, if found and
if they are executable: B<.gear/upstream/filter-tag> is used to separate release tags
from all tags found, and B<.gear/upstream/transform-tag> is used to transform
custom tags like RELEASE_1_0_1 to rpm version compatible look like 1.0.1.
In other words, after you fetch remote commits, you should get a list of available
upstream versions using
 git tag | .gear/upstream/filter-tag | .gear/upstream/transform-tag

=head1	OPTIONS

none.

=head1	AUTHOR

Written by Igor Vlasenko <viy@altlinux.org>.

=head1	COPYING

Copyright (c) 2014-2020 Igor Vlasenko, ALT Linux Team.

This is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

=cut

