Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- #!/bin/bash
-
- TARGET_PATH="/var/www/crm/matsen-tool"
- GIT_PATH="/var/www/matsen-git-repository/matsen-tool-fe/matsen-tool"
-
- create_directories() {
- # Erstelle notwendige Verzeichnisse falls sie nicht existieren
- mkdir -p ${TARGET_PATH}/angular
- }
-
- copy_files() {
- cd ${GIT_PATH}
- sudo GIT_SSH_COMMAND="ssh -i /home/service-spawntree/.ssh/id_rsa -p 1122" git pull
- echo "$(tput setab 2)matsen fe has been PULLED$(tput sgr 0)"
-
- CONFIG_FILES=""
- CONFIG_DIRS=""
- ROOT_DIRS=""
-
- # Erstelle zuerst alle notwendigen Verzeichnisse
- create_directories
-
- cd ${TARGET_PATH}/angular
-
- # Alles außer node_modules löschen
- find . -maxdepth 1 ! -name 'node_modules' ! -name '.' -exec rm -rf {} +
- echo "$(tput setab 2)Client update$(tput sgr 0)"
- cp -r ${GIT_PATH}/* ${TARGET_PATH}/angular
-
- echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
- }
-
- copy_files
-
- npm install
- npx ng build --configuration production
-
- echo "You have updated matsen api!$(tput sgr 0)"
|