Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cmds=(
- 'cd /home/bitrix/www'
- 'sudo -u bitrix git fetch --all'
- 'sudo -u bitrix git reset --hard '$CI_COMMIT_SHA
- )
- for cmd in "${cmds[@]}"; do
- $cmd
- if [[ ! $? -eq 0 ]]; then
- echo "$cmd operation failed."
- exit 1
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement