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.
 
 
 
 

37 line
1.0 KiB

  1. #!/bin/bash
  2. TARGET_PATH="/var/www/crm"
  3. GIT_PATH="/var/www/matsen-git-repository/matsen-tool-fe/matsen-tool"
  4. create_directories() {
  5. # Erstelle notwendige Verzeichnisse falls sie nicht existieren
  6. mkdir -p ${TARGET_PATH}/angular
  7. }
  8. copy_files() {
  9. cd ${GIT_PATH}
  10. sudo GIT_SSH_COMMAND="ssh -i /home/service-spawntree/.ssh/id_rsa -p 1122" git pull
  11. echo "$(tput setab 2)matsen fe has been PULLED$(tput sgr 0)"
  12. # Erstelle zuerst alle notwendigen Verzeichnisse
  13. create_directories
  14. cd ${TARGET_PATH}/angular
  15. # Alles außer node_modules löschen
  16. find . -maxdepth 1 ! -name 'node_modules' ! -name '.' -exec rm -rf {} +
  17. echo "$(tput setab 2)Client update$(tput sgr 0)"
  18. cp -r ${GIT_PATH}/* ${TARGET_PATH}/angular
  19. echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
  20. }
  21. copy_files
  22. npm install
  23. npx ng build --configuration production
  24. cp -r ${TARGET_PATH}/angular/dist/* ${TARGET_PATH}
  25. cp -r ${GIT_PATH}/.htaccess ${TARGET_PATH}/matsen-tool/browser
  26. echo "You have updated matsen client!$(tput sgr 0)"