Skip to content

Commit fbc07e4

Browse files
committed
[#92] Replaced remaining 'build' references with 'packaging' terminology.
1 parent 883857e commit fbc07e4

6 files changed

Lines changed: 32 additions & 32 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ This will create an artifact from current directory and will send it to the
201201
specified remote repository into the same branch as a current one.
202202

203203
Avoid including development dependencies in your artifacts. Instead, configure
204-
your CI to build with production-only dependencies, export the resulting code,
204+
your CI to install production-only dependencies, export the resulting code,
205205
and use that as the artifact source. See our CI examples below.
206206

207207
Call from the CI configuration or deployment script:
@@ -213,7 +213,7 @@ export DEPLOY_BRANCH=<YOUR_CI_PROVIDER_BRANCH_VARIABLE>
213213
--push
214214
```
215215

216-
CI providers may report branches differently when running builds triggered by tags.
216+
CI providers may report branches differently when packaging is triggered by tags.
217217
We encourage you to explore our continuously and automatically tested examples:
218218

219219
- [GitHub Actions](.github/workflows/test-php.yml)
@@ -227,15 +227,15 @@ fully-configured [example in the Vortex project](https://github.com/drevops/vort
227227

228228
| Name | Default value | Description |
229229
|------------------------|---------------------|------------------------------------------------------------------------------------------------|
230-
| `--mode` | `force-push` | Mode of artifact build: `branch`, `force-push` |
230+
| `--mode` | `force-push` | Mode of artifact packaging: `branch`, `force-push` |
231231
| `--branch` | `[branch]` | Destination branch with optional tokens (see below) |
232232
| `--gitignore` | | Path to the `.gitignore` file to replace the current `.gitignore` |
233233
| `--src` | | Directory where source repository is located. Uses root directory if not specified |
234234
| `--root` | | Path to the root for file path resolution. Uses current directory if not specified |
235235
| `--message` | `Deployment commit` | Commit message with optional tokens (see below) |
236236
| `--no-cleanup` | | Do not cleanup after run |
237237
| `--log` | | Path to the log file |
238-
| `--show-changes` | | Show changes made to the repo by the build in the output |
238+
| `--show-changes` | | Show changes made to the repo during packaging in the output |
239239
| `--dry-run` | | Run without pushing to the remote repository |
240240
| `--now` | | Internal value used to set internal time |
241241
| `-h, --help` | | Display help for the given command |
@@ -248,7 +248,7 @@ fully-configured [example in the Vortex project](https://github.com/drevops/vort
248248
## 🧹 Modifying artifact content
249249

250250
`--gitignore` option allows to specify the path to the artifact's `.gitignore`
251-
file that replaces existing `.gitignore` (if any) during the build. Any files no
251+
file that replaces existing `.gitignore` (if any) during packaging. Any files no
252252
longer ignored by the replaced artifact's `.gitignore` are added into the
253253
deployment commit. If there are no no-longer-excluded files, the deployment
254254
commit is still created, to make sure that the deployment timestamp is

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drevops/git-artifact",
3-
"description": "Build artifact from your codebase in CI and push it to a separate git repo.",
3+
"description": "Package artifact from your codebase in CI and push it to a separate git repo.",
44
"license": "GPL-2.0-or-later",
55
"type": "package",
66
"authors": [

src/Commands/ArtifactCommand.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ArtifactCommand extends Command {
4343
protected string $sourceDir = '';
4444

4545
/**
46-
* Mode in which current build is going to run.
46+
* Mode in which artifact packaging is going to run.
4747
*
4848
* Available modes: branch, force-push.
4949
*/
@@ -92,7 +92,7 @@ class ArtifactCommand extends Command {
9292
protected bool $isDryRun = FALSE;
9393

9494
/**
95-
* Flag to specify if cleanup is required to run after the build.
95+
* Flag to specify if cleanup is required to run after packaging.
9696
*/
9797
protected bool $needCleanup = TRUE;
9898

@@ -102,7 +102,7 @@ class ArtifactCommand extends Command {
102102
protected string $logFile = '';
103103

104104
/**
105-
* Flag to show changes made to the repo by the build in the output.
105+
* Flag to show changes made to the repo during packaging in the output.
106106
*/
107107
protected bool $showChanges = FALSE;
108108

@@ -168,12 +168,12 @@ protected function configure(): void {
168168
->addOption('dry-run', NULL, InputOption::VALUE_NONE, 'Run without pushing to the remote repository.')
169169
->addOption('gitignore', NULL, InputOption::VALUE_REQUIRED, 'Path to gitignore file to replace current .gitignore. Leave empty to use current .gitignore.')
170170
->addOption('message', NULL, InputOption::VALUE_REQUIRED, 'Commit message with optional tokens.', 'Deployment commit')
171-
->addOption('mode', NULL, InputOption::VALUE_REQUIRED, 'Mode of artifact build: branch, force-push. Defaults to force-push.', static::MODE_FORCE_PUSH)
171+
->addOption('mode', NULL, InputOption::VALUE_REQUIRED, 'Mode of artifact packaging: branch, force-push. Defaults to force-push.', static::MODE_FORCE_PUSH)
172172
->addOption('no-cleanup', NULL, InputOption::VALUE_NONE, 'Do not cleanup after run.')
173173
->addOption('now', NULL, InputOption::VALUE_REQUIRED, 'Internal value used to set internal time.')
174174
->addOption('log', NULL, InputOption::VALUE_REQUIRED, 'Path to the log file.')
175175
->addOption('root', NULL, InputOption::VALUE_REQUIRED, 'Path to the root for file path resolution. If not specified, current directory is used.')
176-
->addOption('show-changes', NULL, InputOption::VALUE_NONE, 'Show changes made to the repo by the build in the output.')
176+
->addOption('show-changes', NULL, InputOption::VALUE_NONE, 'Show changes made to the repo during packaging in the output.')
177177
->addOption('src', NULL, InputOption::VALUE_REQUIRED, 'Directory where source repository is located. If not specified, root directory is used.')
178178
->addOption('fail-on-missing-branch', NULL, InputOption::VALUE_NONE, 'Fail artifact packaging if source branch cannot be determined. By default, artifact packaging is skipped gracefully.');
179179
// @formatter:on
@@ -402,13 +402,13 @@ protected function resolveOptions(string $url, array $options): void {
402402
}
403403

404404
/**
405-
* Show artifact build information.
405+
* Show artifact packaging information.
406406
*/
407407
protected function showInfo(): void {
408408
$lines[] = ('----------------------------------------------------------------------');
409409
$lines[] = (' Artifact information');
410410
$lines[] = ('----------------------------------------------------------------------');
411-
$lines[] = (' Build timestamp: ' . date('Y/m/d H:i:s', $this->now));
411+
$lines[] = (' Packaging timestamp: ' . date('Y/m/d H:i:s', $this->now));
412412
$lines[] = (' Mode: ' . $this->mode);
413413
$lines[] = (' Source repository: ' . $this->sourceDir);
414414
$lines[] = (' Remote repository: ' . $this->remoteUrl);
@@ -431,7 +431,7 @@ protected function showReport(bool $result): void {
431431
$lines[] = '----------------------------------------------------------------------';
432432
$lines[] = ' Artifact report';
433433
$lines[] = '----------------------------------------------------------------------';
434-
$lines[] = ' Build timestamp: ' . date('Y/m/d H:i:s', $this->now);
434+
$lines[] = ' Packaging timestamp: ' . date('Y/m/d H:i:s', $this->now);
435435
$lines[] = ' Mode: ' . $this->mode;
436436
$lines[] = ' Source repository: ' . $this->sourceDir;
437437
$lines[] = ' Remote repository: ' . $this->remoteUrl;
@@ -447,7 +447,7 @@ protected function showReport(bool $result): void {
447447
}
448448

449449
/**
450-
* Set build mode.
450+
* Set packaging mode.
451451
*
452452
* @param string $mode
453453
* Mode to set.

tests/Functional/BranchModeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function setUp(): void {
2020
parent::setUp();
2121
}
2222

23-
public function testBuild(): void {
23+
public function testPackage(): void {
2424
$this->gitCreateFixtureCommits(2);
2525

2626
$output = $this->assertArtifactCommandSuccess();
@@ -31,7 +31,7 @@ public function testBuild(): void {
3131
$this->gitAssertFixtureCommits(2, $this->dst, 'testbranch', ['Deployment commit']);
3232
}
3333

34-
public function testBuildMoreCommitsSameBranch(): void {
34+
public function testPackageMoreCommitsSameBranch(): void {
3535
$this->gitCreateFixtureCommits(2);
3636

3737
$this->assertArtifactCommandSuccess();
@@ -45,7 +45,7 @@ public function testBuildMoreCommitsSameBranch(): void {
4545
$this->gitAssertFixtureCommits(2, $this->dst, 'testbranch', ['Deployment commit']);
4646
}
4747

48-
public function testBuildMoreCommits(): void {
48+
public function testPackageMoreCommits(): void {
4949
$this->gitCreateFixtureCommits(2);
5050

5151
$this->now = time() - rand(1, 10 * 60);

tests/Functional/ForcePushModeTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function setUp(): void {
2020
parent::setUp();
2121
}
2222

23-
public function testBuild(): void {
23+
public function testPackage(): void {
2424
$this->gitCreateFixtureCommits(2);
2525

2626
$output = $this->assertArtifactCommandSuccess();
@@ -30,7 +30,7 @@ public function testBuild(): void {
3030
$this->gitAssertFixtureCommits(2, $this->dst, 'testbranch', ['Deployment commit']);
3131
}
3232

33-
public function testBuildMoreCommits(): void {
33+
public function testPackageMoreCommits(): void {
3434
$this->gitCreateFixtureCommits(2);
3535

3636
$this->assertArtifactCommandSuccess();
@@ -165,7 +165,7 @@ public function testGitignoreCustom(): void {
165165

166166
// Now, remove the .gitignore and push again.
167167
// We have to create 'uic' file since it was rightfully
168-
// removed during previous build run and the source repo branch was not
168+
// removed during previous packaging run and the source repo branch was not
169169
// reset (uncommitted files would be removed, unless they are excluded
170170
// in .gitignore).
171171
$this->fixtureCreateFile($this->src, 'uic');
@@ -266,7 +266,7 @@ public function testGitignoreCustomAllowlisting(): void {
266266
'dir_other/node_modules',
267267
]);
268268

269-
// Run the build.
269+
// Run the packaging.
270270
$this->assertArtifactCommandSuccess([
271271
'-vvv' => TRUE,
272272
'--gitignore' => $this->src . DIRECTORY_SEPARATOR . 'mygitignore',
@@ -305,7 +305,7 @@ public function testGitignoreCustomAllowlisting(): void {
305305
]);
306306
}
307307

308-
public function testBuildSafebranch(): void {
308+
public function testPackageSafebranch(): void {
309309
$this->gitCreateFixtureCommits(2);
310310
$this->gitCreateBranch($this->src, 'Feature/so1me/f3ature');
311311
$this->gitCheckout($this->src, 'Feature/so1me/f3ature');
@@ -314,7 +314,7 @@ public function testBuildSafebranch(): void {
314314
$this->assertArtifactCommandSuccess(['--branch' => '[safebranch]'], 'feature-so1me-f3ature');
315315
}
316316

317-
public function testBuildTag(): void {
317+
public function testPackageTag(): void {
318318
$this->gitCreateFixtureCommits(2);
319319
$this->gitAddTag($this->src, 'tag1');
320320

@@ -323,7 +323,7 @@ public function testBuildTag(): void {
323323
$this->gitAssertFixtureCommits(2, $this->dst, 'tag1', ['Deployment commit']);
324324
}
325325

326-
public function testBuildMultipleTags(): void {
326+
public function testPackageMultipleTags(): void {
327327
$this->gitCreateFixtureCommits(2);
328328
$this->gitAddTag($this->src, 'tag1');
329329
$this->gitAddTag($this->src, 'tag2');
@@ -337,15 +337,15 @@ public function testBuildMultipleTags(): void {
337337
$this->gitAssertFixtureCommits(3, $this->dst, 'tag3', ['Deployment commit']);
338338
}
339339

340-
public function testBuildMultipleTagsMissingTags(): void {
340+
public function testPackageMultipleTagsMissingTags(): void {
341341
$this->gitCreateFixtureCommits(2);
342342
$this->gitAddTag($this->src, 'tag1');
343343
$this->gitCreateFixtureCommit(3);
344344

345345
$this->assertArtifactCommandFailure(['--branch' => '[tags]']);
346346
}
347347

348-
public function testBuildMultipleTagsDelimiter(): void {
348+
public function testPackageMultipleTagsDelimiter(): void {
349349
$this->gitCreateFixtureCommits(2);
350350
$this->gitAddTag($this->src, 'tag1');
351351
$this->gitAddTag($this->src, 'tag2');

tests/Functional/FunctionalTestCase.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ protected function tearDown(): void {
9494
}
9595

9696
/**
97-
* Build the artifact and assert success.
97+
* Package the artifact and assert success.
9898
*
9999
* @param array $args
100-
* Array of arguments to pass to the build.
100+
* Array of arguments to pass to packaging.
101101
* @param string $branch
102102
* Expected branch name.
103103
* @param string $commit
@@ -120,10 +120,10 @@ protected function assertArtifactCommandSuccess(?array $args = [], string $branc
120120
}
121121

122122
/**
123-
* Build the artifact and assert failure.
123+
* Package the artifact and assert failure.
124124
*
125125
* @param array $args
126-
* * Array of arguments to pass to the build.
126+
* * Array of arguments to pass to packaging.
127127
* * @param string $branch
128128
* * Expected branch name.
129129
* @param string $commit
@@ -145,7 +145,7 @@ protected function assertArtifactCommandFailure(?array $args = [], string $commi
145145
}
146146

147147
/**
148-
* Run artifact build.
148+
* Run artifact packaging.
149149
*
150150
* @param array $args
151151
* Additional arguments or options as an associative array. If NULL, no

0 commit comments

Comments
 (0)