Skip to content

Commit e030366

Browse files
committed
Release 7.5.7
1 parent dda2ffb commit e030366

File tree

5 files changed

+1
-104
lines changed

5 files changed

+1
-104
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
deployer.phar
21
.phpunit.result.cache
32
docker-compose.override.yml
43
.php-cs-fixer.cache

bin/build

Lines changed: 1 addition & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -5,97 +5,5 @@
55
* For the full copyright and license information, please view the LICENSE
66
* file that was distributed with this source code.
77
*/
8-
if (ini_get('phar.readonly') === '1') {
9-
throw new \Exception('Writing to phar files is disabled. Change your `php.ini` or append `-d phar.readonly=false` to the shebang, if supported by your `env` executable.');
10-
}
118

12-
define('__ROOT__', realpath(__DIR__ . '/..'));
13-
chdir(__ROOT__);
14-
15-
$opt = getopt('v:', ['nozip']);
16-
17-
$version = $opt['v'] ?? null;
18-
if (empty($version)) {
19-
echo "Please, specify version as \"-v8.0.0\".\n";
20-
exit(1);
21-
}
22-
if (!preg_match('/^\d+\.\d+\.\d+(\-\w+(\.\d+)?)?$/', $version)) {
23-
echo "Version must be \"7.0.0-beta.42\". Got \"$version\".\n";
24-
exit(1);
25-
}
26-
27-
$pharName = "deployer.phar";
28-
$pharFile = __ROOT__ . '/' . $pharName;
29-
if (file_exists($pharFile)) {
30-
unlink($pharFile);
31-
}
32-
33-
$ignore = [
34-
'.anton',
35-
'.git',
36-
'Tests',
37-
'tests',
38-
'deploy.php',
39-
'.php-cs-fixer.dist.php',
40-
];
41-
42-
$phar = new \Phar($pharFile, 0, $pharName);
43-
$phar->setSignatureAlgorithm(\Phar::SHA1);
44-
$phar->startBuffering();
45-
$iterator = new RecursiveDirectoryIterator(__ROOT__, FilesystemIterator::SKIP_DOTS);
46-
$iterator = new RecursiveCallbackFilterIterator($iterator, function (SplFileInfo $fileInfo) use ($ignore) {
47-
return !in_array($fileInfo->getBasename(), $ignore, true);
48-
});
49-
$iterator = new RecursiveIteratorIterator($iterator);
50-
$iterator = new CallbackFilterIterator($iterator, function (SplFileInfo $fileInfo) {
51-
//'bash', 'fish', 'zsh' is a completion templates
52-
return in_array($fileInfo->getExtension(), ['php', 'exe', 'bash', 'fish', 'zsh'], true);
53-
});
54-
55-
foreach ($iterator as $fileInfo) {
56-
$file = str_replace(__ROOT__, '', $fileInfo->getRealPath());
57-
echo "+ " . $file . "\n";
58-
$phar->addFile($fileInfo->getRealPath(), $file);
59-
60-
if (!array_key_exists('nozip', $opt)) {
61-
$phar[$file]->compress(Phar::GZ);
62-
63-
if (!$phar[$file]->isCompressed()) {
64-
echo "Could not compress File: $file\n";
65-
}
66-
}
67-
}
68-
69-
// Add schema.json
70-
echo "+ /src/schema.json\n";
71-
$phar->addFile(realpath(__DIR__ . '/../src/schema.json'), '/src/schema.json');
72-
73-
// Add Caddyfile
74-
echo "+ /recipe/provision/Caddyfile\n";
75-
$phar->addFile(realpath(__DIR__ . '/../recipe/provision/Caddyfile'), '/recipe/provision/Caddyfile');
76-
77-
// Add 404.html
78-
echo "+ /recipe/provision/404.html\n";
79-
$phar->addFile(realpath(__DIR__ . '/../recipe/provision/404.html'), '/recipe/provision/404.html');
80-
81-
// Add bin/dep file
82-
echo "+ /bin/dep\n";
83-
$depContent = file_get_contents(__ROOT__ . '/bin/dep');
84-
$depContent = str_replace("#!/usr/bin/env php\n", '', $depContent);
85-
$depContent = str_replace('__FILE__', 'str_replace("phar://", "", Phar::running())', $depContent);
86-
$depContent = preg_replace("/run\('.+?'/", "run('$version'", $depContent);
87-
$phar->addFromString('bin/dep', $depContent);
88-
89-
$phar->setStub(
90-
<<<STUB
91-
#!/usr/bin/env php
92-
<?php
93-
Phar::mapPhar('{$pharName}');
94-
require 'phar://{$pharName}/bin/dep';
95-
__HALT_COMPILER();
96-
STUB
97-
);
98-
$phar->stopBuffering();
99-
unset($phar);
100-
101-
echo "$pharName was created successfully.\n";
9+
echo "Do nothing.\n";

bin/dep

773 KB
Binary file not shown.

composer.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@
2020
"url": "https://github.com/sponsors/antonmedv"
2121
}
2222
],
23-
"autoload": {
24-
"psr-4": {
25-
"Deployer\\": "src/"
26-
},
27-
"files": [
28-
"vendor/autoload.php",
29-
"src/Support/helpers.php",
30-
"src/functions.php"
31-
]
32-
},
3323
"scripts": {
3424
"test": "pest",
3525
"test:e2e": "pest --config tests/e2e/phpunit-e2e.xml",

deployer.phar

776 KB
Binary file not shown.

0 commit comments

Comments
 (0)