From 6eda2a3035a897f15105d1d6c592fa1e35a0e16c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 8 Jun 2021 00:14:47 +0200 Subject: [PATCH] fix ci yapf command if no python files found --- .drone.jsonnet | 2 +- .drone.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index ecf6cd6..4b304ac 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -21,7 +21,7 @@ local PipelineLinting = { }, commands: [ 'pip install -qq yapf', - 'yapf -dr ./', + '[ ! -z "$(find . -type f -name *.py)" ] && yapf -rd ./', ], }, { diff --git a/.drone.yml b/.drone.yml index 34e50bc..9f43a2d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: python:3.9 commands: - pip install -qq yapf - - yapf -dr ./ + - "[ ! -z \"$(find . -type f -name *.py)\" ] && yapf -rd ./" environment: PY_COLORS: 1 @@ -147,6 +147,6 @@ depends_on: --- kind: signature -hmac: e07a7f0edb5c259c1b17f33b40d353c57cf932cbf933f2033f634f79aa82ad80 +hmac: 9986a39347925db27a9bc2ae5b322badc490a73e099e3580db08e0d4b112da10 ...