这是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
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ install:
- if [[ $deps = low ]]; then make update-min; else make install; fi
script:
- if [[ $deps = low ]]; then make test-min; else make test; fi
- make package
- make package package-devkit
deploy:
provider: releases
api_key:
secure: U0BP6+CaAYKAPC5pNIzgIpITLIL5lc0fPRSRW2SBdCh5u55NuHoHL22LldK+309t0L8mxLybq6yh4pUksBdkKB/gKLEI4Vrc5hZeR1y49kIClDIAllrQeCAn+XgDZlZls/Q/Op8DPkAouJrj0Y2qBTWrhAG1Fhn9SLsIcVG0x4JhbKd4I0IN+G4YgxSpzcdYEc6uszqZrPSGKjK+ygrnZ2IJZ+roUTJIQXCK0KEOGHx7sKS4mtqvd5hEx9P+FUZcs3Pp7nNp/gJBWd80ZNbVj7iiOulc7Fl2BxqLqVKGqyv7ekqyeg2vaDz2GpbBiYGbDXiGQlJ0kGlENCuTyqS0ZQ/j9O0htaO57C1m0HVFu+gX34cnL6vP6dkwqjPRDQA8BQ1YNeKQcCP7LDYY/OXvYwaEhB2iw7/e6PjYhQTv41kStGGyTqrFbGNWpV/JM+7oCjr977C8lfDU9I1A/MHRHQHuMKPLA2jygCIVzibmxElsfDaHkIbrbgKZ4ukRYr9fyDVfjv9L2TNWp19++JdDbwBDutuho9E23AFgqEQJjTGTG4mf9pX3tFlfGv+3VDe7LhNm69Wkat1lMjFnL4qjI+uY2K9JdHqPZPw0SOaUpbh9BSuv7+n3Wp/j59Dva136BOK/KUEleD2PBf2oufO+ETLDEofpKQ8HA0R/8K1HN2w=
file: build/toolbox.phar
file:
- build/toolbox.phar
- build/devkit.phar
skip_cleanup: true
on:
tags: true
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ package: tools/box
@rm -rf build/phar
.PHONY: package

package-devkit: tools/box
$(eval VERSION=$(shell (git describe --abbrev=0 --tags 2>/dev/null || echo "0.1-dev") | sed -e 's/^v//'))
@rm -rf build/devkit-phar && mkdir -p build/devkit-phar build/devkit-phar/bin

cp -r src resources LICENSE composer.json scoper.inc.php build/devkit-phar
sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php

cd build/devkit-phar && \
composer config platform.php 7.1.3 && \
composer update --no-dev -o -a

tools/box compile -c box-devkit.json.dist

@rm -rf build/devkit-phar
.PHONY: package-devkit

tools: tools/php-cs-fixer tools/deptrac tools/infection tools/box
.PHONY: tools

Expand Down
6 changes: 3 additions & 3 deletions bin/devkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ protected function configure()

protected function execute(InputInterface $input, OutputInterface $output)
{
$jsonPath = realpath($input->getOption('tools'));
$readmePath = realpath($input->getOption('readme'));
$jsonPath = $input->getOption('tools');
$readmePath = $input->getOption('readme');
$tools = (new Tools($jsonPath))->all();
$toolsList = $tools->reduce('', function ($acc, Tool $tool) {
return $acc . sprintf('* %s - [%s](%s)', $tool->name(), $tool->summary(), $tool->website()) . PHP_EOL;
Expand All @@ -56,7 +56,7 @@ protected function configure()

protected function execute(InputInterface $input, OutputInterface $output)
{
$jsonPath = realpath($input->getOption('tools'));
$jsonPath = $input->getOption('tools');

$phars = $this->findLatestPhars($jsonPath);

Expand Down
18 changes: 18 additions & 0 deletions box-devkit.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"base-path": "build/devkit-phar",
"output": "../devkit.phar",
"compression": "GZ",
"directories": ["."],
"dump-autoload": true,
"exclude-composer-files": true,
"check-requirements": false,
"main": "bin/devkit.php",
"compactors": [
"KevinGH\\Box\\Compactor\\PhpScoper"
],
"banner": [
"This file is part of the zalas/toolbox project.",
"",
"(c) Jakub Zalas <jakub@zalas.pl>"
]
}