Ver código fonte

update skript

master
Daniel 1 ano atrás
pai
commit
d03a0fb07f
1 arquivos alterados com 13 adições e 1 exclusões
  1. +13
    -1
      1deployMatsenApi.sh

+ 13
- 1
1deployMatsenApi.sh Ver arquivo

@@ -3,6 +3,13 @@
TARGET_PATH="/var/www/crm-api/httpdocs"
GIT_PATH="/var/www/matsen-git-repository/matsen-tool-be"

create_directories() {
# Erstelle notwendige Verzeichnisse falls sie nicht existieren
mkdir -p ${TARGET_PATH}/config
mkdir -p ${TARGET_PATH}/public
mkdir -p ${TARGET_PATH}/var/cache
}

copy_files() {
cd ${GIT_PATH}
sudo GIT_SSH_COMMAND="ssh -i /home/service-spawntree/.ssh/id_rsa -p 1122" git pull
@@ -12,6 +19,9 @@ copy_files() {
CONFIG_DIRS="packages routes"
ROOT_DIRS="bin migrations src"

# Erstelle zuerst alle notwendigen Verzeichnisse
create_directories

rm -rf ${TARGET_PATH}/composer.lock
rm -rf ${TARGET_PATH}/composer.json
cp -rf ${GIT_PATH}/composer.json ${TARGET_PATH}
@@ -31,8 +41,10 @@ copy_files() {
cp -rf ${GIT_PATH}/$dir ${TARGET_PATH}/
done

# Stelle sicher, dass der public Ordner existiert
mkdir -p ${TARGET_PATH}/public
rm -rf ${TARGET_PATH}/public/index.php
cp -rf ${GIT_PATH}/public/index.php ${TARGET_PATH}/public
cp -rf ${GIT_PATH}/public/index.php ${TARGET_PATH}/public/

echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
}


Carregando…
Cancelar
Salvar