diff options
Diffstat (limited to 'src/util/git-push-everything.pl')
-rwxr-xr-x | src/util/git-push-everything.pl | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/util/git-push-everything.pl b/src/util/git-push-everything.pl index 10ad4dc..fb3782d 100755 --- a/src/util/git-push-everything.pl +++ b/src/util/git-push-everything.pl @@ -11,7 +11,8 @@ use strict; $#ARGV == 2 or die; my ($git_cmd, $git_repo, $git_master_repo) = @ARGV; -# Central Cactus repository +# Local and central Cactus repositories +my $git_local_repo = $ENV{'CACTUS_LOCAL_GIT_REPO'}; my $git_central_repo = $ENV{'CACTUS_CENTRAL_GIT_REPO'}; # Path where the git-*.pl commands are installed @@ -60,6 +61,29 @@ if ($?) { +if (defined $git_local_repo) { + $ENV{'GIT_DIR'} = "$git_master_repo/.git"; + + print "Formaline: Pushing to local repository $git_local_repo...\n"; + + print "Executing: $git_cmd push -v -f --all '$git_local_repo'\n" + unless $silent; + system "$git_cmd push -v -f --all '$git_local_repo' $silencer"; + if ($?) { + die "Could not push branches\nCommand was\n $git_cmd push -v -f --all '$git_local_repo'"; + } + + print "$git_cmd push -v -f --tags '$git_local_repo'\n" unless $silent; + system "$git_cmd push -v -f --tags '$git_local_repo' $silencer"; + if ($?) { + die "Could not push tags\nCommand was\n $git_cmd push -v -f --tags '$git_local_repo'"; + } + + system "${bindir}/git-gc-repo.pl '$git_cmd' '$git_local_repo'"; +} + + + if (defined $git_central_repo) { $ENV{'GIT_DIR'} = "$git_master_repo/.git"; |