Ticket #5207: 5207_tag-path.diff
File 5207_tag-path.diff, 1.4 KB (added by , 5 years ago) |
---|
-
cli/class-import.php
464 464 $blocks[ $block_name ]->title = $trunk_readme->name; 465 465 } 466 466 467 if ( 'trunk' === $stable_tag ) { 468 $stable_path = $stable_tag; 469 } else { 470 $stable_path = "tags/$stable_tag"; 471 } 472 467 473 // Find blocks dist/build JS files 468 474 $block_files = array(); 469 $dist_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_ tag}/dist" ) ?: array();470 $build_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_ tag}/build" ) ?: array();475 $dist_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_path}/dist" ) ?: array(); 476 $build_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_path}/build" ) ?: array(); 471 477 472 478 foreach ( $dist_files as $file ) { 473 $block_files[] = "/{$stable_ tag}/dist/" . $file;479 $block_files[] = "/{$stable_path}/dist/" . $file; 474 480 } 475 481 476 482 foreach ( $build_files as $file ) { 477 $block_files[] = "/{$stable_ tag}/build/" . $file;483 $block_files[] = "/{$stable_path}/build/" . $file; 478 484 } 479 485 480 486 if ( empty( $block_files ) ) { 481 487 foreach ( $files_with_blocks as $file ) { 482 $block_files[] = "/{$stable_ tag}/" . $file;488 $block_files[] = "/{$stable_path}/" . $file; 483 489 } 484 490 } 485 491