Advertisement
vitvayti

deploy.sh

Nov 7th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cmds=(
  4.   'cd /home/bitrix/www'
  5.   'sudo -u bitrix git fetch --all'
  6.   'sudo -u bitrix git reset --hard '$CI_COMMIT_SHA
  7. )
  8.  
  9. for cmd in "${cmds[@]}"; do
  10.     $cmd
  11.     if [[ ! $? -eq 0 ]]; then
  12.       echo "$cmd operation failed."
  13.       exit 1
  14.     fi
  15. done
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement