Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
add publish
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 10, 2020
1 parent 1398e7c commit 06c6b8c
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,27 @@ jobs:
php build/box.phar info ../tmp/ecs.phar
../tmp/ecs.phar
cd ..
# Deploy PHAR to https://github.com/Symplify/EasyCodingStandardPrefixed
# reuse tmp/rector.phar from previous job
git clone https://${ACCESS_TOKEN}@github.com/Symplify/EasyCodingStandardPrefixed.git > /dev/null 2>&1
cp tmp/ecs.phar EasyCodingStandardPrefixed/ecs.phar
cp tmp/ecs.phar EasyCodingStandardPrefixed/ecs
cd EasyCodingStandardPrefixed
git config user.email "[email protected]"
git config user.name "Github Actions"
git add ecs ecs.phar
if [ "${TRAVIS_TAG}" != "" ]; then COMMIT_MSG="ECS ${TRAVIS_TAG}"; else COMMIT_MSG="Updated ECS to commit ${TRAVIS_COMMIT}"; fi
git commit -m "${COMMIT_MSG}"
git push --quiet origin master
if [ "${TRAVIS_TAG}" != "" ]; then git tag "${TRAVIS_TAG}" && git push --quiet origin ${TRAVIS_TAG}; fi
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

binary_files:
runs-on: ubuntu-latest

Expand Down
2 changes: 2 additions & 0 deletions ecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ parameters:
# tests
- 'packages/*/tests/**Source/*.php'
- 'packages/CodingStandard/tests/Fixer/Order/MethodOrderByTypeFixer/Wrong/*'
# own scope
- 'packages/EasyCodingStandard/compiler/build/scoper.inc.php'

skip:
# run form time to time, very slow and making many changes
Expand Down
3 changes: 2 additions & 1 deletion packages/EasyCodingStandard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a href="https://github.com/lmc-eu/php-coding-standard"><img src="/docs/logos/lmc.png"></a>
<img src="/docs/logos/space.png">
<a href="https://github.com/nette/coding-standard"><img src="/docs/logos/nette.png"></a>
<img src="/docs/logos/space.png">
<br>
<a href="https://github.com/shopsys/coding-standards"><img src="/docs/logos/shopsys.png"></a>
<img src="/docs/logos/space.png">
<a href="https://github.com/SyliusLabs/CodingStandard"><img src="/docs/logos/sylius.png"></a>
Expand All @@ -23,6 +23,7 @@
- **2nd run under few seconds** with caching
- [Skipping files](#ignore-what-you-cant-fix) for specific checkers
- [Prepared checker sets](#use-prepared-checker-sets) - PSR12, Symfony, Common, Symplify and more...
- Use [Prefixed version](https://github.com/Symplify/EasyCodingStandardPrefixed) to prevent conflicts on install

Are you already using another tool?

Expand Down
4 changes: 2 additions & 2 deletions packages/EasyCodingStandard/bin/ecs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if ($inputConfig) {
}

// 2. --set CLI option
$setInputConfig = $configResolver->resolveSetFromInputAndDirectory($input, __DIR__ . '/../config/set');
$setInputConfig = $configResolver->resolveSetFromInputAndDirectory($input, Set::SET_DIRECTORY);
if ($setInputConfig) {
$configs[] = $setInputConfig;
}
Expand Down Expand Up @@ -178,7 +178,7 @@ final class AutoloadIncluder
return;
}

require_once $phpCodeSnifferAutoload;
$this->loadIfNotLoadedYet($phpCodeSnifferAutoload, __METHOD__ . '()" on line ' . __LINE__);

// initalize PHPCS tokens
new Tokens();
Expand Down
2 changes: 1 addition & 1 deletion packages/EasyCodingStandard/compiler/bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Symplify\EasyCodingStandard\Compiler\Console\CompileCommand;
use Symplify\EasyCodingStandard\Compiler\Process\CompileProcessFactory;
use Symfony\Component\Console\Application;

// use monorepo autoload.php
// use EasyCodingStandard package autoload.php
require_once __DIR__ . '/../vendor/autoload.php';

$compileCommand = new CompileCommand(
Expand Down
Empty file modified packages/EasyCodingStandard/compiler/build/box.phar
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion packages/EasyCodingStandard/compiler/build/scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ function (string $filePath, string $prefix, string $content): string {
return str_replace('__DIR__ . \'/..', '\'phar://ecs.phar', $content);
},
],
'whitelist' => ['Symplify\*', 'PHP_CodeSniffer\*', 'PhpCsFixer\*'],
'whitelist' => [
// needed for autoload, that is not prefixed, since it's in bin/* file
'Symplify\*',
],
];

0 comments on commit 06c6b8c

Please sign in to comment.