-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.html
666 lines (630 loc) · 34.4 KB
/
config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
<!DOCTYPE html>
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<head><base href="/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/css/theme.css" type="text/css" />
<link rel="stylesheet" href="assets/css/highlightjs.css" type="text/css" />
<link rel="stylesheet" href="assets/css/badge_only.css" type="text/css" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<div class="wy-nav-content"> <div class="rst-content">
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody">
<div class="section">
<h1 id="configuration">
Configuration
<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a>
</h1>
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>Caution</span>
</p><p>Since HuPKit v1.4 using global configuration for repositories is deprecated.</p>
<p>The examples in this chapter expect you are using HuPKit v1.4, any older
versions are no longer supported.</p>
</div>
<p>If you are still using a version prior to v1.4 see <a href="upgrade.html" class="reference internal">Upgrade HuPKit</a> how to
to update your configuration.</p>
<div class="section">
<h2 id="schema-version">
Schema Version
<a class="headerlink" href="#schema-version" title="Permalink to this headline">¶</a>
</h2>
<p>The <code translate="no" class="notranslate">schema_version</code> defines the configuration schema version.</p>
<p>At this moment only <code translate="no" class="notranslate">1</code> and <code translate="no" class="notranslate">2</code> are accepted, note that version
<code translate="no" class="notranslate">1</code> is deprecated and will no longer work in HuPKit v2.0+.</p>
<p>As some advanced features require local configuration it's best to use
<code translate="no" class="notranslate">schema_version=2</code>.</p>
</div>
<div class="section">
<h2 id="authentication">
Authentication
<a class="headerlink" href="#authentication" title="Permalink to this headline">¶</a>
</h2>
<p>Before HuPKit can be used to manage your repositories you first need to configure
the GitHub authentication credentials.</p>
<p>Get a new token at: <a href="https://github.com/settings/tokens/new" class="reference external" rel="external noopener noreferrer" target="_blank">https://github.com/settings/tokens/new</a></p>
<p>Use a unique and distinct name like: <code translate="no" class="notranslate">hupkit on computer-1 at 2016-11-01 14:54 CET</code>
with scopes: <code translate="no" class="notranslate">repo, user:email, read:gpg_key</code>.</p>
<p>HuPKit supports GitHub Enterprise, and therefor you can add multiple
hub configurations by there hostname; The default host is <code translate="no" class="notranslate">github.com</code>.</p>
<div translate="no" class="highlight-php notranslate">
<table class="highlighttable">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre>
</div>
</td>
<td class="code">
<div class="highlight">
<pre class="hljs php"><span class="hljs-comment">// config.php</span>
<span class="hljs-keyword">return</span> [
<span class="hljs-comment">// ...</span>
<span class="hljs-string">'github'</span> => [
<span class="hljs-string">'github.com'</span> => [ <span class="hljs-comment">// hostname of the hub</span>
<span class="hljs-string">'username'</span> => <span class="hljs-string">''</span>, <span class="hljs-comment">// fill-in your github username</span>
<span class="hljs-string">'api_token'</span> => <span class="hljs-string">''</span>, <span class="hljs-comment">// fill-in the new GitHub authentication token (NOT YOUR PASSWORD!)</span>
],
<span class="hljs-comment">// 'hub.my-corp.com' => [ // hostname of your GitHub Enterprise installation</span>
<span class="hljs-comment">// 'username' => '', // fill-in your github username</span>
<span class="hljs-comment">// 'api_token' => '', // fill-in the new GitHub authentication token (NOT YOUR PASSWORD!)</span>
<span class="hljs-comment">// 'api_url' => 'https://api.hub.mycorp.com/' // schema + hostname to API endpoint (excluding API version)</span>
<span class="hljs-comment">// ],</span>
],
];</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<span id="repository-configuration"></span>
</div>
<div class="section">
<h2 id="repository-configuration">
Repository Configuration
<a class="headerlink" href="#repository-configuration" title="Permalink to this headline">¶</a>
</h2>
<p>Specific features like repository splitting, or disabling upmerge for
some branches only work when the configuration for a repository is set-up.</p>
<p>The configuration (and hook-scripts) are kept in a 'orphaned' branch "_hubkit".</p>
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>Caution</span>
</p><p>For historical reasons the branch is named <code translate="no" class="notranslate">_hubkit</code>, not <code translate="no" class="notranslate">_hupkit</code>,
in HuPKit v2.0 this will change.</p>
</div>
<p><em>An orphan branch has no relation to any other branch, it's fully separate,
and thus has no common parent. This same technique is also used by GitHub for
pages stored separate from the main branch.</em></p>
<div class="admonition admonition-important ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
<span>Important</span>
</p><p><strong>No authentication credentials must be stored in the <code translate="no" class="notranslate">_hupkit</code> branch!</strong></p>
</div>
<div class="section">
<h3 id="initialize-configuration-for-a-repository">
Initialize Configuration For a Repository
<a class="headerlink" href="#initialize-configuration-for-a-repository" title="Permalink to this headline">¶</a>
</h3>
<p>To create the HuPKit configuration branch run the <code translate="no" class="notranslate">init-config</code> command.</p>
<p>The command will automatically import any existing global configuration for
the repository from the HuPKit main <code translate="no" class="notranslate">config.php</code> file, and all files stored
in the ".hubkit" directory (of the current branch).</p>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>The root <code translate="no" class="notranslate">.gitignore</code> file is automatically copied from your current
branch to ensure no unrelated files are accidentally added when working
on the <code translate="no" class="notranslate">_hubkit</code> branch.</p>
</div>
<p>The <code translate="no" class="notranslate">_hubkit</code> branch sits separate from your normal Git workflow and shares
no parenting to any existing branch.</p>
<p>The <code translate="no" class="notranslate">config.php</code> file contains the configuration _only_ for the current repository.</p>
<div translate="no" class="highlight-php notranslate">
<table class="highlighttable">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48</pre>
</div>
</td>
<td class="code">
<div class="highlight">
<pre class="hljs php"><span class="hljs-meta"><?php</span>
<span class="hljs-comment">// config.php (in the `_hubkit` branch)</span>
<span class="hljs-keyword">return</span> [
<span class="hljs-string">'schema_version'</span> => <span class="hljs-number">2</span>,
<span class="hljs-comment">// Adapter configuration (optional, when cannot be resolved automatically)</span>
<span class="hljs-comment">// 'adapter' => 'github', //Defaults to github, currently no other adapters supported</span>
<span class="hljs-comment">// 'host' => 'github.com',</span>
<span class="hljs-comment">// 'repository' => 'organization/repository-name',</span>
<span class="hljs-comment">// Which branch is considered the main branch. Either: 'main', 'master', '2.0', or 'trunk'</span>
<span class="hljs-comment">// This configuration is used (among) for upmerging as the last last branch in the list.</span>
<span class="hljs-comment">//</span>
<span class="hljs-comment">// If not set this is automatically guessed at application boot, in v2.0 this will default to 'main'.</span>
<span class="hljs-comment">//'main_branch' => null,</span>
<span class="hljs-comment">// See Branches section below for supported configuration</span>
<span class="hljs-string">'branches'</span> => [],
<span class="hljs-comment">// Branches-alias for 'named' branches</span>
<span class="hljs-comment">//</span>
<span class="hljs-comment">// This only applies to branches that are not explicitly versioned (like 1.0, 1.5)</span>
<span class="hljs-comment">// The value should be a stable major.minor version (not: 0.5, master, 1.5-dev, 1.2-beta1) but 1.0, 1.5, 23.4</span>
<span class="hljs-comment">// 'branches_alias' => [</span>
<span class="hljs-comment">// // 'main' => '1.0',</span>
<span class="hljs-comment">// // 'dev/main' => '1.0',</span>
<span class="hljs-comment">// // '1.x' => '1.5',</span>
<span class="hljs-comment">// ],</span>
<span class="hljs-comment">//'pull_request' => [</span>
<span class="hljs-comment">// Either:</span>
<span class="hljs-comment">// * 'all' (default)</span>
<span class="hljs-comment">// * 'changed-only' (only split changed files matched in prefixes)</span>
<span class="hljs-comment">// * 'none' (don't split, same as using the `--no-split` command option)</span>
<span class="hljs-comment">// 'split' => 'all',</span>
<span class="hljs-comment">//],</span>
<span class="hljs-comment">//'release' => [</span>
<span class="hljs-comment">// Either:</span>
<span class="hljs-comment">// 'all' (default)</span>
<span class="hljs-comment">// 'changed-only' (only create split releases for prefixes that have changed since the last release)</span>
<span class="hljs-comment">// 'split' => 'all',</span>
<span class="hljs-comment">// Either: true (default; enabled), false (explicitly disabled), or null (use Git config 'tag.gpgSign')</span>
<span class="hljs-comment">// 'signed' => true,</span>
<span class="hljs-comment">//],</span>
];</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>Caution</span>
</p><p>It's best not to disable signing of Git tags.</p>
</div>
</div>
<div class="section">
<h3 id="branches">
Branches
<a class="headerlink" href="#branches" title="Permalink to this headline">¶</a>
</h3>
<p>A branch name can be either any valid branch-name, a minor-version pattern
<code translate="no" class="notranslate">2.x`/`v2.*</code>, or a regexp (without anchors or options) like <code translate="no" class="notranslate">/[1-2]\.\d+/</code>.</p>
<p>There is one special branch-name <code translate="no" class="notranslate">:default</code> which allows to set-up the defaults
all branches (see below).</p>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>When an actual branch can be confused for a pattern (<code translate="no" class="notranslate">1.x</code>) use <code translate="no" class="notranslate">#1.x</code> instead.</p>
<p>Using the <code translate="no" class="notranslate">#branch-name</code> works for all branches and considers the branch-name
as a literal instead of a pattern or regexp.</p>
</div>
<p>The <code translate="no" class="notranslate">:default</code> branch defines the default configuration for _all_ branches, and
is later merged with the configuration of a specific branch. Use <code translate="no" class="notranslate">'ignore-default' => true</code>
for a specific branch configuration to ignore inherited defaults.</p>
<p>When no specific branch is found like 'main' or '2.1' the correct configuration
is resolved by traversing all (in order of listing) the patterns and regexp
until a matching version is found.</p>
<p>If no configuration was found the <code translate="no" class="notranslate">:default</code> configuration is used.</p>
<p>Use <code translate="no" class="notranslate">false</code> as value for a branch to mark that branch as unmaintained.
An unmaintained branch skips upmerging to <em>and</em> from this branch.</p>
<p>Using this option will give a warning whenever this branch is used for either merging,
releasing, taking an issue, etc.</p>
<div class="admonition admonition-tip ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg>
<span>Tip</span>
</p><p>Use regexes like <code translate="no" class="notranslate">/[12]\.\d+/</code> or <code translate="no" class="notranslate">/main|dev/trunk|(12\.0)/</code> to use multiple
versions or names at once (no anchors or head grouping, <code translate="no" class="notranslate">/main|master/</code> not
<code translate="no" class="notranslate">/(main|12\.0)/</code>).</p>
<p>As the configuration file is still Php it's also possible use variables for sharing
configuration between branches.</p>
</div>
<p>Each branch has the following options:</p>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code translate="no" class="notranslate">sync-tags</code></td>
<td>Boolean</td>
<td><code translate="no" class="notranslate">true</code></td>
<td>_Only when 'split' targets are <em>configured</em>; whether new tags should be synchronized when creating a release</td>
</tr>
<tr>
<td><code translate="no" class="notranslate">ignore-default</code></td>
<td>Boolean</td>
<td><code translate="no" class="notranslate">false</code></td>
<td>Whether the ':default' configuration should be ignored</td>
</tr>
<tr>
<td><code translate="no" class="notranslate">upmerge</code></td>
<td>Boolean</td>
<td><code translate="no" class="notranslate">true</code></td>
<td>Set to false to disable upmerge for this branch configuration, and continue with next possible version</td>
</tr>
<tr>
<td><code translate="no" class="notranslate">split</code></td>
<td>array</td>
<td><code translate="no" class="notranslate">[]</code></td>
<td>See [Repository splitting](#splitting) for details.</td>
</tr>
<tr>
<td><code translate="no" class="notranslate">maintained</code></td>
<td>Boolean</td>
<td><code translate="no" class="notranslate">true</code></td>
<td><code translate="no" class="notranslate">true</code> when maintained, use <code translate="no" class="notranslate">false</code> as config value shorthand</td>
</tr>
</tbody>
</table>
</div>
<div translate="no" class="highlight-php notranslate">
<table class="highlighttable">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44</pre>
</div>
</td>
<td class="code">
<div class="highlight">
<pre class="hljs php"><span class="hljs-comment">// config.php</span>
<span class="hljs-keyword">return</span> [
<span class="hljs-comment">// ...</span>
<span class="hljs-string">'branches'</span> => [
<span class="hljs-string">':default'</span> => [
<span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">true</span>,
<span class="hljs-string">'split'</span> => [
<span class="hljs-comment">// A path (relative to root, no patterns) and the url to split to (with additional options)</span>
<span class="hljs-comment">// See below for all options.</span>
<span class="hljs-string">'src/Module/CoreModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/core-module.git'</span>,
<span class="hljs-string">'src/Module/WebhostingModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/webhosting-module.git'</span>,
<span class="hljs-string">'docs'</span> => [<span class="hljs-string">'url'</span> => <span class="hljs-string">'[email protected]:park-manager/doc.git'</span>, <span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">false</span>],
],
],
<span class="hljs-string">'main'</span> => [ <span class="hljs-comment">// Can be any valid branch-name: dev/trunk, master, development</span>
<span class="hljs-string">'src/Module/CustomerModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/customer-module.git'</span>,
],
<span class="hljs-string">'1.0'</span> => <span class="hljs-keyword">false</span>, <span class="hljs-comment">// Mark branch as unmaintained</span>
<span class="hljs-string">'2.x'</span> => [ <span class="hljs-comment">// '2.x' is a pattern equivalent to '/2\.\d+/'</span>
<span class="hljs-string">'upmerge'</span> => <span class="hljs-keyword">false</span>, <span class="hljs-comment">// Disable upmerge for this branch, effectively all of the '2.x' range are skipped</span>
<span class="hljs-comment">// Split's is inherited and merged from ':default'</span>
<span class="hljs-string">'split'</span> => [
<span class="hljs-string">'src/Module/DomainRegModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/webhosting-module.git'</span>,
],
],
<span class="hljs-string">'#3.x'</span> => [ <span class="hljs-comment">// The actual branch name is 3.x would be confused for a pattern</span>
<span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">null</span>, <span class="hljs-comment">// Inherit from the root configuration.</span>
<span class="hljs-string">'split'</span> => [
<span class="hljs-string">'src/Module/WebhostingModule'</span> => <span class="hljs-keyword">false</span>,
<span class="hljs-string">'src/Module/DomainRegModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/webhosting-module.git'</span>,
],
],
<span class="hljs-string">'/4\.\d+/'</span> => [ <span class="hljs-comment">// Same as 4.x</span>
<span class="hljs-string">'ignore-default'</span> => <span class="hljs-keyword">true</span>, <span class="hljs-comment">// Nothing is inherited from ':default'</span>
<span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">false</span>,
<span class="hljs-string">'src/Bundle/CoreBundle'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/core-module.git'</span>,
<span class="hljs-string">'src/Bundle/WebhostingBundle'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/webhosting-module.git'</span>,
<span class="hljs-string">'docs'</span> => [<span class="hljs-string">'url'</span> => <span class="hljs-string">'[email protected]:park-manager/doc.git'</span>, <span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">false</span>],
],
],
];</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>A branch cannot start with Git refs <code translate="no" class="notranslate">{heads, tags, remotes, notes}/</code>, or be <code translate="no" class="notranslate">HEAD</code>.</p>
</div>
<span id="splitting-config"></span>
</div>
<div class="section">
<h3 id="repository-splitting-split-config">
Repository splitting (`split` config)
<a class="headerlink" href="#repository-splitting-split-config" title="Permalink to this headline">¶</a>
</h3>
<p>A list of paths (relative to repository root, <em>no patterns</em>) and the value,
either a 'push url' or an array with following options:
<code translate="no" class="notranslate">['url' => 'push url', 'sync-tags' => false]</code>.</p>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>Missing directories are ignored with a warning. In HuPKit v2.0 this
behavior is bound to change, use the branches configuration to ensure
to paths aren't missing.</p>
<p>Splits are expected to exist, see also <a href="split-repositories.html" class="reference internal">Managing Split Repositories</a>.</p>
</div>
<div translate="no" class="highlight-php notranslate">
<table class="highlighttable">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre>
</div>
</td>
<td class="code">
<div class="highlight">
<pre class="hljs php"><span class="hljs-keyword">return</span> [
<span class="hljs-comment">// ...</span>
<span class="hljs-string">'branches'</span> => [
<span class="hljs-string">':default'</span> => [
<span class="hljs-comment">// ...</span>
<span class="hljs-string">'split'</span> => [
<span class="hljs-string">'src/Module/CoreModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/core-module.git'</span>,
<span class="hljs-string">'src/Module/WebhostingModule'</span> => <span class="hljs-string">'[email protected]:hubkit-sandbox/webhosting-module.git'</span>,
<span class="hljs-string">'docs'</span> => [<span class="hljs-string">'url'</span> => <span class="hljs-string">'[email protected]:park-manager/doc.git'</span>, <span class="hljs-string">'sync-tags'</span> => <span class="hljs-keyword">false</span>],
],
],
],
];</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>See also <a href="split-repositories.html" class="reference internal">Managing Split Repositories</a></p>
</div>
</div>
<div class="section">
<h2 id="editing-repository-configuration">
Editing Repository Configuration
<a class="headerlink" href="#editing-repository-configuration" title="Permalink to this headline">¶</a>
</h2>
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>Caution</span>
</p><p>Always run the <code translate="no" class="notranslate">self-diagnose</code> command to check your configuration,
and see if there any configuration violations before switching back
to the main branch or synchronizing with the remote (see below).</p>
<p>If the application fails start due to a configuration error run HuPKit
with the env <code translate="no" class="notranslate">HUBKIT_NO_LOCAL=true</code> like <code translate="no" class="notranslate">HUBKIT_NO_LOCAL=true hupkit self-diagnose</code>.</p>
</div>
<p>To change the contents of the _hubkit branch run the <code translate="no" class="notranslate">edit-config</code> command.</p>
<p>In practice this checksout the <code translate="no" class="notranslate">_hubkit</code> branch, but also ensures no files
would be overwritten by this checkout (like a git-ignored config.php file.)</p>
</div>
<div class="section">
<h2 id="synchronize-configuration">
Synchronize Configuration
<a class="headerlink" href="#synchronize-configuration" title="Permalink to this headline">¶</a>
</h2>
<p>To update the configuration by either pushing your changes or pulling-in
the latest version from "upstream" simply run the <code translate="no" class="notranslate">sync-config</code> command.</p>
<p>Only if your branches have diverged to much you need to resolve any
conflicts manually. Once done run the command again.</p>
<p>Use the <code translate="no" class="notranslate">self-diagnose</code> command to check your configuration and see if any
update (push or pull) is needed.</p>
</div>
<div class="section">
<h2 id="remote-names">
Remote names
<a class="headerlink" href="#remote-names" title="Permalink to this headline">¶</a>
</h2>
<p>By default HuPKit uses "upstream" as the remote-name for the main-repository.
If for any reason you need to change this, either because you use a different
convention or only use "origin" without a fork, you can use a local configuration
file to change this.</p>
<p>Add a ".hk_remotes" file at the root-level of your repository with the following contents:</p>
<div translate="no" class="highlight-ini notranslate">
<table class="highlighttable">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>1
2
3
4</pre>
</div>
</td>
<td class="code">
<div class="highlight">
<pre class="hljs ini"><span class="hljs-comment">; Commented line</span>
<span class="hljs-attr">main</span> = upstream
<span class="hljs-attr">fork</span> = origin</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The config "main" is the main repository which all team-members pull and push from,
"fork" is your own fork (if any).</p>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>This is about remote <em>names</em> not actual repository url's.</p>
</div>
<p>The file format is similar to an ini-file, a line can contain either a
comment (<code translate="no" class="notranslate">; Comment</code>) <em>or</em> a variable ("main" or "fork"), no overwrites,
no different names (than shown), and comments can only be used on their
own line (not at the end of a variable declaration).</p>
<div class="admonition admonition-important ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
<span>Important</span>
</p><p>This file should be ignored by Git as it only applies to your own local
<code translate="no" class="notranslate">.git/config</code> file and remote names.</p>
</div>
<p>Use the <code translate="no" class="notranslate">-v</code> flag with any command to see which value is used.</p>
</div>
<div class="section">
<h2 id="whats-next">
Whats Next?
<a class="headerlink" href="#whats-next" title="Permalink to this headline">¶</a>
</h2>
<p>Run the <code translate="no" class="notranslate">self-diagnose</code> command to ensure everything is configured correctly.</p>
<div class="admonition admonition-tip ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg>
<span>Tip</span>
</p><p>This command is best run from a Git repository.</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
</section>
</div>
<script type="text/javascript" src="assets/js/theme.js"></script>
<script type="text/javascript" src="assets/js/badge_only.js"></script>
</body>
</html>