Ein für Shopware 6 vorbereitet Systemmanagment.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1005 B

  1. #!/bin/bash
  2. ### DO NOT EDIT THIS FILE
  3. source "$(dirname "${BASH_SOURCE[0]}")/../../includes/includes.sh"
  4. app_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." &> /dev/null && pwd)
  5. source "$app_dir/etc/config.sh"
  6. env=$(getArgument $1 "Usage: deploy.sh [live|stage]" "live stage")
  7. echoMainTitle "Deploying $env system"
  8. httpdocs_path="$(getConfig "$env" "httpdocs_path")"
  9. httpdocs_git_subpath="$(getConfig "$env" "httpdocs_git_subpath")"
  10. ssh_user="$(getConfig "$env" "ssh_user")"
  11. ssh_domain="$(getConfig "$env" "ssh_domain")"
  12. path="$httpdocs_path$httpdocs_git_subpath"
  13. addSSHKey "$env"
  14. ssh "$ssh_user"@"$ssh_domain" "cd $path && git stash"
  15. ssh "$ssh_user"@"$ssh_domain" "cd $path && git ls-files -m | rm"
  16. ssh "$ssh_user"@"$ssh_domain" "cd $path && git pull"
  17. ssh "$ssh_user"@"$ssh_domain" "$path/bin/console cache:clear"
  18. ssh "$ssh_user"@"$ssh_domain" "$path/bin/console theme:compile"
  19. echo "... system deployed"
  20. echo "Running postscript ..."
  21. postScript "$app_dir/bin/postscripts/functions/deploy.sh"