run from script

This commit is contained in:
Joseph Montanaro 2022-01-21 10:30:46 -08:00
parent fcdfd667bd
commit 935eb6cc51
2 changed files with 12 additions and 2 deletions

View File

@ -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

10
run.sh Normal file
View File

@ -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