diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-09-04 21:05:45 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-09-04 21:05:45 -0700 |
commit | 76a550c67328cf1f5f0ae18300d68f8c3507745a (patch) | |
tree | 8aae664405566e4826f03eec1ea83e5fdff4ed06 /bin/git-push-all | |
parent | 8654d2fe544afed2efe709d747ba0c1598acff17 (diff) | |
download | dotfiles-76a550c67328cf1f5f0ae18300d68f8c3507745a.tar.gz |
avoid trying to push tags with dgit & ublock-origin
Diffstat (limited to 'bin/git-push-all')
-rwxr-xr-x | bin/git-push-all | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/bin/git-push-all b/bin/git-push-all index 3c04b254..0633b949 100755 --- a/bin/git-push-all +++ b/bin/git-push-all @@ -100,24 +100,26 @@ foreach my $remote ( keys %pushes ) { # TODO definitely split out because should be run as a safety catch by # src-unregistered -my @tags = grep { !(m|archive/debian/\S+|) } $git->tag; -my @remotes = $git->remote; -my @pushed_tags; - -foreach my $remote ( @remotes ) { - unless ( $remote eq "dgit" ) { - my @this_remote_tags = apply { s|\^\{\}$||; s|[a-f0-9]+\trefs/tags/|| } - $git->ls_remote( { tags => 1 }, $remote ); - push @pushed_tags, @this_remote_tags; +unless ( "--no-tags" ~~ @ARGV ) { + my @tags = grep { !(m|archive/debian/\S+|) } $git->tag; + my @remotes = $git->remote; + my @pushed_tags; + + foreach my $remote ( @remotes ) { + unless ( $remote eq "dgit" ) { + my @this_remote_tags = apply { s|\^\{\}$||; s|[a-f0-9]+\trefs/tags/|| } + $git->ls_remote( { tags => 1 }, $remote ); + push @pushed_tags, @this_remote_tags; + } } -} -@pushed_tags = uniq @pushed_tags; -my @unpushed_tags = array_minus ( @tags, @pushed_tags ); + @pushed_tags = uniq @pushed_tags; + my @unpushed_tags = array_minus ( @tags, @pushed_tags ); -if ( scalar @unpushed_tags > 0 ) { - print "E: the following tags have not been pushed to any remote:\n"; - print join(", ", @unpushed_tags); - print "\n"; - exit 1; + if ( scalar @unpushed_tags > 0 ) { + print "E: the following tags have not been pushed to any remote:\n"; + print join(", ", @unpushed_tags); + print "\n"; + exit 1; + } } |