diff --git a/.drone.yml b/.drone.yml index 638ba51..289960a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,5 +13,5 @@ steps: SLACK_HOOK_URL: from_secret: slack_hook_url commands: - - pip install requests - - python bot.py + - chmod +x run.sh + - ./run.sh \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..9909cb0 --- /dev/null +++ b/run.sh @@ -0,0 +1,10 @@ +set +x + +# capture output so we can display conditionally +INSTALL_OUTPUT=$(pip install requests) +if [[ $? > 0 ]]; then + echo "$INSTALL_OUTPUT" + exit 1 +fi + +python bot.py \ No newline at end of file