Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

38 righe
999 B

  1. #!/bin/bash
  2. TARGET_PATH="/var/www/crm/matsen-tool"
  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. CONFIG_FILES=""
  13. CONFIG_DIRS=""
  14. ROOT_DIRS=""
  15. # Erstelle zuerst alle notwendigen Verzeichnisse
  16. create_directories
  17. cd ${TARGET_PATH}/angular
  18. # Alles außer node_modules löschen
  19. find . -maxdepth 1 ! -name 'node_modules' ! -name '.' -exec rm -rf {} +
  20. echo "$(tput setab 2)Client update$(tput sgr 0)"
  21. cp -r ${GIT_PATH}/* ${TARGET_PATH}/angular
  22. echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
  23. }
  24. copy_files
  25. npm install
  26. npx ng build --configuration production
  27. echo "You have updated matsen api!$(tput sgr 0)"