Skip to content

Commit a8dc192

Browse files
committed
Fix checkout script
1 parent 1fa3c17 commit a8dc192

File tree

2 files changed

+68
-21
lines changed

2 files changed

+68
-21
lines changed

src/wp-includes/blocks/blocks-json.php

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
'title' => 'Accordion',
77
'category' => 'design',
88
'description' => 'Displays a foldable layout that groups content in collapsible sections.',
9-
'example' => array(),
9+
'example' => array(
10+
11+
),
1012
'supports' => array(
1113
'anchor' => true,
1214
'html' => false,
@@ -581,7 +583,9 @@
581583
),
582584
'content' => array(
583585
'type' => 'object',
584-
'default' => array()
586+
'default' => array(
587+
588+
)
585589
)
586590
),
587591
'providesContext' => array(
@@ -2545,7 +2549,9 @@
25452549
'attributes' => array(
25462550
'images' => array(
25472551
'type' => 'array',
2548-
'default' => array(),
2552+
'default' => array(
2553+
2554+
),
25492555
'source' => 'query',
25502556
'selector' => '.blocks-gallery-item',
25512557
'query' => array(
@@ -2592,14 +2598,18 @@
25922598
'items' => array(
25932599
'type' => 'number'
25942600
),
2595-
'default' => array()
2601+
'default' => array(
2602+
2603+
)
25962604
),
25972605
'shortCodeTransforms' => array(
25982606
'type' => 'array',
25992607
'items' => array(
26002608
'type' => 'object'
26012609
),
2602-
'default' => array()
2610+
'default' => array(
2611+
2612+
)
26032613
),
26042614
'columns' => array(
26052615
'type' => 'number',
@@ -5898,12 +5908,18 @@
58985908
'orderBy' => 'date',
58995909
'author' => '',
59005910
'search' => '',
5901-
'exclude' => array(),
5911+
'exclude' => array(
5912+
5913+
),
59025914
'sticky' => '',
59035915
'inherit' => true,
59045916
'taxQuery' => null,
5905-
'parents' => array(),
5906-
'format' => array()
5917+
'parents' => array(
5918+
5919+
),
5920+
'format' => array(
5921+
5922+
)
59075923
)
59085924
),
59095925
'tagName' => array(
@@ -6673,7 +6689,9 @@
66736689
),
66746690
'query' => array(
66756691
'type' => 'object',
6676-
'default' => array()
6692+
'default' => array(
6693+
6694+
)
66776695
),
66786696
'isSearchFieldHidden' => array(
66796697
'type' => 'boolean',
@@ -7314,13 +7332,17 @@
73147332
),
73157333
'head' => array(
73167334
'type' => 'array',
7317-
'default' => array(),
7335+
'default' => array(
7336+
7337+
),
73187338
'source' => 'query',
73197339
'selector' => 'thead tr',
73207340
'query' => array(
73217341
'cells' => array(
73227342
'type' => 'array',
7323-
'default' => array(),
7343+
'default' => array(
7344+
7345+
),
73247346
'source' => 'query',
73257347
'selector' => 'td,th',
73267348
'query' => array(
@@ -7360,13 +7382,17 @@
73607382
),
73617383
'body' => array(
73627384
'type' => 'array',
7363-
'default' => array(),
7385+
'default' => array(
7386+
7387+
),
73647388
'source' => 'query',
73657389
'selector' => 'tbody tr',
73667390
'query' => array(
73677391
'cells' => array(
73687392
'type' => 'array',
7369-
'default' => array(),
7393+
'default' => array(
7394+
7395+
),
73707396
'source' => 'query',
73717397
'selector' => 'td,th',
73727398
'query' => array(
@@ -7406,13 +7432,17 @@
74067432
),
74077433
'foot' => array(
74087434
'type' => 'array',
7409-
'default' => array(),
7435+
'default' => array(
7436+
7437+
),
74107438
'source' => 'query',
74117439
'selector' => 'tfoot tr',
74127440
'query' => array(
74137441
'cells' => array(
74147442
'type' => 'array',
7415-
'default' => array(),
7443+
'default' => array(
7444+
7445+
),
74167446
'source' => 'query',
74177447
'selector' => 'td,th',
74187448
'query' => array(
@@ -7926,7 +7956,9 @@
79267956
'taxonomy' => 'category',
79277957
'order' => 'asc',
79287958
'orderBy' => 'name',
7929-
'include' => array(),
7959+
'include' => array(
7960+
7961+
),
79307962
'hideEmpty' => true,
79317963
'showNested' => false,
79327964
'inherit' => false
@@ -7974,8 +8006,12 @@
79748006
)
79758007
),
79768008
'default' => array(
7977-
array(),
7978-
array()
8009+
array(
8010+
8011+
),
8012+
array(
8013+
8014+
)
79798015
)
79808016
),
79818017
'columns' => array(
@@ -8160,7 +8196,9 @@
81608196
'items' => array(
81618197
'type' => 'object'
81628198
),
8163-
'default' => array()
8199+
'default' => array(
8200+
8201+
)
81648202
)
81658203
),
81668204
'supports' => array(
@@ -8201,4 +8239,4 @@
82018239
'editorStyle' => 'wp-block-widget-group-editor',
82028240
'style' => 'wp-block-widget-group'
82038241
)
8204-
);
8242+
);

tools/gutenberg/checkout-gutenberg.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,16 @@ async function main() {
152152
if ( ! gutenbergExists ) {
153153
console.log( '\n📥 Cloning Gutenberg repository (shallow clone)...' );
154154
try {
155-
await exec( 'git', [ 'clone', '--depth', '1', '--branch', ref, GUTENBERG_REPO, 'gutenberg' ] );
155+
// Generic shallow clone approach that works for both branches and commit hashes
156+
// 1. Clone with no checkout
157+
await exec( 'git', [ 'clone', '--no-checkout', GUTENBERG_REPO, 'gutenberg' ] );
158+
159+
// 2. Fetch the specific ref with depth 1 (works for branches, tags, and commits)
160+
await exec( 'git', [ 'fetch', '--depth', '1', 'origin', ref ], { cwd: gutenbergDir } );
161+
162+
// 3. Checkout FETCH_HEAD
163+
await exec( 'git', [ 'checkout', 'FETCH_HEAD' ], { cwd: gutenbergDir } );
164+
156165
console.log( '✅ Cloned successfully' );
157166
} catch ( error ) {
158167
console.error( '❌ Clone failed:', error.message );

0 commit comments

Comments
 (0)