From b852a616111adea43a9b5b273c966c0f9cb2783a Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 22 May 2021 14:12:19 +0200 Subject: [PATCH 1/5] Add PHP-CS check --- .drone.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.drone.yml b/.drone.yml index 304a7453..5b728e13 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,3 +32,40 @@ steps: image: friendicaci/transifex commands: - /check-addons.sh +--- +kind: pipeline +type: docker +name: php-cs check + +clone: + disable: true + +trigger: + event: + - pull_request + +steps: + - name: clone friendica base + image: alpine/git + commands: + - git clone https://github.com/friendica/friendica.git . + - git checkout $DRONE_COMMIT_BRANCH + - name: clone friendica addon + image: alpine/git + commands: + - git clone $DRONE_REPO_LINK addon + - cd addon/ + - git checkout $DRONE_COMMIT_BRANCH + - git fetch origin $DRONE_COMMIT_REF + - git merge $DRONE_COMMIT_SHA + - name: Install dependencies + image: composer + commands: + - ./bin/composer.phar run cs:install + - name: Run coding standards check + image: friendicaci/php-cs + commands: + - cd addon/ + - export CHANGED_FILES="$(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")" + - cd ../ + - /check-php-cs.sh -- 2.43.5 From 622ec88fe302046de20f7eaeaa542aa1d6fbacd5 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 22 May 2021 18:50:42 +0200 Subject: [PATCH 2/5] test-files for PHP-CS --- blockbot/test.php | 5 +++++ blockem/test.php | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 blockbot/test.php create mode 100644 blockem/test.php diff --git a/blockbot/test.php b/blockbot/test.php new file mode 100644 index 00000000..34d55a48 --- /dev/null +++ b/blockbot/test.php @@ -0,0 +1,5 @@ + Date: Sat, 22 May 2021 20:06:07 +0200 Subject: [PATCH 3/5] Remove test-files --- blockbot/test.php | 5 ----- blockem/test.php | 5 ----- 2 files changed, 10 deletions(-) delete mode 100644 blockbot/test.php delete mode 100644 blockem/test.php diff --git a/blockbot/test.php b/blockbot/test.php deleted file mode 100644 index 34d55a48..00000000 --- a/blockbot/test.php +++ /dev/null @@ -1,5 +0,0 @@ - Date: Sat, 22 May 2021 23:43:18 +0200 Subject: [PATCH 4/5] Update .drone.yml Co-authored-by: Hypolite Petovan --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5b728e13..2dfb2fda 100644 --- a/.drone.yml +++ b/.drone.yml @@ -45,7 +45,7 @@ trigger: - pull_request steps: - - name: clone friendica base + - name: Clone friendica base image: alpine/git commands: - git clone https://github.com/friendica/friendica.git . -- 2.43.5 From f4f61aa1518857247f012f27e28e45a9d0813090 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 22 May 2021 23:43:22 +0200 Subject: [PATCH 5/5] Update .drone.yml Co-authored-by: Hypolite Petovan --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2dfb2fda..4e3239f5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -50,7 +50,7 @@ steps: commands: - git clone https://github.com/friendica/friendica.git . - git checkout $DRONE_COMMIT_BRANCH - - name: clone friendica addon + - name: Clone friendica addon image: alpine/git commands: - git clone $DRONE_REPO_LINK addon -- 2.43.5