Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.48.0" installed="2.48.2" location="./.phive/composer-normalize" copy="false"/>
<phar name="composer-require-checker" version="^4.20.0" installed="4.20.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="box-project/box" version="^4.6.10" installed="4.6.10" location="./.phive/box" copy="false"/>
</phive>
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,19 @@ update: ## Updates composer dependencies by running composer update command
.PHONY: update

phive: ## Installs dependencies with phive
$(APP_RUNNER) /usr/local/bin/phive install --trust-gpg-keys 0xC00543248C87FB13,0x033E5F8D801A2F8D
$(APP_RUNNER) /usr/local/bin/phive install --trust-gpg-keys 0xC00543248C87FB13,0x033E5F8D801A2F8D,0x2DF45277AEF09A2F
.PHONY: phive

phar: ## Builds the PHAR archive
$(APP_RUNNER) sh -c "git config --global --add safe.directory /app \
&& composer install --no-dev --optimize-autoloader --classmap-authoritative \
&& .phive/box validate \
&& .phive/box compile \
&& .phive/box info .build/phar/phony.phar \
&& .build/phar/phony.phar \
&& composer install"
.PHONY: phar

#
# Code Quality, Git, Linting
# ------------------------------------------------------------------------------------
Expand Down
28 changes: 28 additions & 0 deletions bin/phony
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

use WayOfDev\Phony\Application;

// Find autoloader
$autoloadPaths = [
__DIR__ . '/../vendor/autoload.php',
];

$autoloadFound = false;
foreach ($autoloadPaths as $autoloadPath) {
if (file_exists($autoloadPath)) {
require $autoloadPath;
$autoloadFound = true;
break;
}
}

if (! $autoloadFound) {
fwrite(STDERR, "Could not find autoloader. Run 'composer install' first.\n");
exit(1);
}

$application = new Application();
$application->run();
40 changes: 40 additions & 0 deletions box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://raw.githubusercontent.com/box-project/box/main/res/schema.json",
"alias": "phony.phar",
"compactors": [
"KevinGH\\Box\\Compactor\\Php"
],
"compression": "GZ",
"directories": [
"src"
],
"files": [
"vendor/autoload.php"
],
"finder": [
{
"name": "*.php",
"exclude": [
"Tests",
"tests",
"test",
"spec"
],
"in": "vendor"
},
{
"name": "*",
"in": "vendor/symfony/console/Resources"
},
{
"name": "*.json",
"in": "vendor/ergebnis/composer-normalize/resource"
},
{
"name": "*.json",
"in": "vendor/maglnet/composer-require-checker/data"
}
],
"replacement-sigil": "@",
"output": ".build/phar/phony.phar"
}
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"vimeo/psalm": "^6.14",
"wayofdev/cs-fixer-config": "^1.5"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"WayOfDev\\Phony\\": "src/"
Expand All @@ -52,6 +54,9 @@
"WayOfDev\\Tests\\": "tests/src/"
}
},
"bin": [
"bin/phony"
],
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
Expand Down
69 changes: 35 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading