Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filling in permission keys to launch plugins #83

Merged
merged 3 commits into from Jun 16, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -8,7 +8,7 @@ ARG INPUT_EDITORCONFIG
ARG INPUT_DEPENDABOT
ARG INPUT_NORMALIZE

RUN composer global require dragon-code/codestyler:^2.0
RUN composer global require dragon-code/codestyler:^2.1

COPY shell /shell
COPY entrypoint.sh /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion bin/codestyle
Expand Up @@ -39,8 +39,8 @@ require_once $file;
$application = new Application('The Dragon Code Styler');

$application->add(new Check());
$application->add(new Fix());
$application->add(new Dependabot());
$application->add(new EditorConfig());
$application->add(new Fix());

$application->run();
1 change: 1 addition & 0 deletions entrypoint.sh
Expand Up @@ -2,6 +2,7 @@

source /shell/functions.sh
source /shell/config.sh
source /shell/plugins.sh

source /shell/check.sh
source /shell/fix.sh
Expand Down
2 changes: 0 additions & 2 deletions shell/normalize.sh
Expand Up @@ -7,8 +7,6 @@ if [[ $(allow "$INPUT_NORMALIZE") == "true" ]]; then
if [[ -f "./composer.json" ]]; then
IS_DIRTY_NORMALIZE=1

composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true

{ composer normalize --ansi && git add . && git commit -a -m "Normalize \`composer.json\` 👀"; } || IS_DIRTY_NORMALIZE=0
fi
fi
13 changes: 13 additions & 0 deletions shell/plugins.sh
@@ -0,0 +1,13 @@
#!/bin/sh -l

IS_PLUGINS_CONFIG=1

composer global config --no-plugins allow-plugins.dragon-code/codestyler true
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global config --no-plugins allow-plugins.friendsofphp/php-cs-fixer true

composer config --no-plugins allow-plugins.dragon-code/codestyler true
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer config --no-plugins allow-plugins.friendsofphp/php-cs-fixer true

{ git add . && git commit -a -m "Updated permissions to run plugins 🦾"; } || IS_PLUGINS_CONFIG=0
2 changes: 1 addition & 1 deletion shell/push.sh
Expand Up @@ -3,7 +3,7 @@
function isDirty() {
local result="false"

if [[ "$IS_DIRTY_DEPENDABOT" == "1" || "$IS_DIRTY_EDITORCONFIG" == "1" || "$IS_DIRTY_CODE" == "1" || "$IS_DIRTY_NORMALIZE" == "1" ]]; then
if [[ "$IS_DIRTY_DEPENDABOT" == "1" || "$IS_DIRTY_EDITORCONFIG" == "1" || "$IS_DIRTY_CODE" == "1" || "$IS_DIRTY_NORMALIZE" == "1" || "$IS_PLUGINS_CONFIG" == "1" ]]; then
result="true"
fi

Expand Down