Skip to content

Commit 6a909c2

Browse files
authored
Merge pull request #52 from wp-cli/fix/sync
2 parents 7fa105e + 711a7dc commit 6a909c2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.maintenance/clone-all-repositories.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@
4040
continue;
4141
}
4242

43+
$destination = isset( $clone_destination_map[ $repository->name ] ) ? $clone_destination_map[ $repository->name ] : $repository->name;
44+
4345
if ( ! is_dir( $repository->name ) ) {
44-
$destination = isset( $clone_destination_map[ $repository->name ] ) ? $clone_destination_map[ $repository->name ] : '';
4546
printf( "Fetching \033[32mwp-cli/{$repository->name}\033[0m...\n" );
4647
$clone_url = getenv( 'GITHUB_ACTION' ) ? $repository->clone_url : $repository->ssh_url;
4748
system( "git clone {$clone_url} {$destination}" );
4849
}
4950

50-
$update_folders[] = $repository->name;
51+
$update_folders[] = $destination;
5152
}
5253

5354
$updates = implode( '\n', $update_folders );

.maintenance/refresh-repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
printf( "--- Refreshing repository \033[32m{$repository}\033[0m ---\n" );
1111

1212
printf( "Switching to latest \033[33mdefault\033[0m branch...\n" );
13-
system( "git --git-dir={$path}/.git --work-tree={$path} checkout $(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)" );
13+
system( "git --git-dir={$path}/.git --work-tree={$path} checkout $(git --git-dir={$path}/.git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)" );
1414

1515
printf( "Pulling latest changes...\n" );
1616
system( "git --git-dir={$path}/.git --work-tree={$path} pull" );

0 commit comments

Comments
 (0)