update(144.76.113.134):
  tags:
  - 144.76.113.134
  only:
    - master
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
    - which php7.0
    - which sqlite3
  script:
    # Pfad zum neu geklonten Repo
    - path=`pwd`
    - cd ~/
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
    - composer update
    - php artisan queue:restart
    - scp metager@metager3.de:~/.env .
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
    - chmod 777 config/sumas.xml config/sumasEn.xml
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer
    
update(metager3.de):
  tags:
  - metager3
  only:
    - master
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
    - which php7.0
    - which sqlite3
  script:
    # Pfad zum neu geklonten Repo
    - path=`pwd`
    - cd ~/
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
    - composer update
    - php artisan queue:restart
    - scp metager@metager3.de:~/.env .
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
    - chmod 777 config/sumas.xml config/sumasEn.xml
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer