这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ It has been extracted as a separate project to make maintenance easier and enabl

* composer - [Dependency Manager for PHP](https://getcomposer.org/)
* composer-bin-plugin - [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin)
* box - [An application for building and managing Phars](https://box-project.github.io/box2/)
* box - [Fast, zero config application bundler with PHARs](https://github.com/humbug/box)
* box-legacy - [Legacy version of box](https://box-project.github.io/box2/)
* analyze - [Visualizes metrics and source code](https://github.com/Qafoo/QualityAnalyzer)
* behat - [Helps to test business expectations](http://behat.org/)
* churn - [Discovers good candidates for refactoring](https://github.com/bmitch/churn-php)
Expand Down
4 changes: 4 additions & 0 deletions bin/devkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
file_put_contents($readmePath, $readme);

$output->writeln(sprintf('The <info>%s</info> was updated with latest tools found in <info>%s</info>.', $readmePath, implode(', ', $jsonPath)));

return 0;
}
}
);
Expand Down Expand Up @@ -171,6 +173,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$tools = $this->loadTools($input->getOption('tools'), new Filter([\Zalas\Toolbox\UseCase\InstallTools::PRE_INSTALLATION_TAG], []));

$output->writeln($this->renderPage($tools->map($this->toolToHtml())));

return 0;
}

private function toolToHtml(): \Closure
Expand Down
19 changes: 16 additions & 3 deletions resources/pre-installation.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,27 @@
},
{
"name": "box",
"summary": "An application for building and managing Phars",
"summary": "Fast, zero config application bundler with PHARs",
"website": "https://github.com/humbug/box",
"command": {
"phar-download": {
"phar": "https://github.com/humbug/box/releases/download/3.8.4/box.phar",
"bin": "%target-dir%/box"
}
},
"test": "box list",
"tags": ["pre-installation"]
},
{
"name": "box-legacy",
"summary": "Legacy version of box",
"website": "https://box-project.github.io/box2/",
"command": {
"sh": {
"command": "curl -Ls https://box-project.github.io/box2/installer.php | php && mv box.phar %target-dir%/box && chmod +x %target-dir%/box"
"command": "curl -Ls https://box-project.github.io/box2/installer.php | php && mv box.phar %target-dir%/box-legacy && chmod +x %target-dir%/box-legacy"
}
},
"test": "box list",
"test": "box-legacy list",
"tags": ["pre-installation"]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/Tool/Command/BoxBuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(string $repository, string $phar, string $bin, strin
public function __toString(): string
{
return \sprintf(
'git clone %s %s&& cd %s && git checkout %s && composer install --no-dev --no-suggest --prefer-dist -n && box build && mv %s %s && chmod +x %s && cd && rm -rf %s',
'git clone %s %s&& cd %s && git checkout %s && composer install --no-dev --no-suggest --prefer-dist -n && box-legacy build && mv %s %s && chmod +x %s && cd && rm -rf %s',
$this->repository,
$this->targetDir(),
$this->targetDir(),
Expand Down
2 changes: 1 addition & 1 deletion tests/Tool/Command/BoxBuildCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function test_it_generates_the_installation_command()
$this->assertRegExp('#cd /tools/behat#', (string) $command);
$this->assertRegExp('#git checkout '.self::VERSION.'#', (string) $command);
$this->assertRegExp('#composer install --no-dev --no-suggest --prefer-dist -n#', (string) $command);
$this->assertRegExp('#box build#', (string) $command);
$this->assertRegExp('#box-legacy build#', (string) $command);
}

public function test_it_tries_to_guess_version_number_if_not_given_one()
Expand Down
2 changes: 1 addition & 1 deletion tests/UseCase/InstallToolsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function test_it_includes_box_build_commands()

$command = $this->useCase->__invoke($this->filter());

$this->assertRegExp('#box build#', (string)$command);
$this->assertRegExp('#box-legacy build#', (string)$command);
}

public function test_it_includes_phar_download_commands()
Expand Down