From aa55e10e6964b0f3d7807c62e935d5bc00223c69 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Wed, 21 Apr 2021 08:09:53 -0300 Subject: [PATCH] chore: add helper scripts - Deploy (merge into production, push, composer install and npm install) - start_vagrant (just start vagrant and browser) - ssh_homestead (a simple ssh into homestead) --- .gitignore | 7 ------- deploy.sh | 2 ++ ssh_homestead.sh | 1 + start_vagrant.sh | 4 ++++ 4 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 deploy.sh create mode 100644 ssh_homestead.sh create mode 100644 start_vagrant.sh diff --git a/.gitignore b/.gitignore index eb99f12..c3816be 100644 --- a/.gitignore +++ b/.gitignore @@ -5,14 +5,7 @@ /vendor /.idea /.vscode -/.vagrant -Homestead.json -Homestead.yaml npm-debug.log yarn-error.log .env .phpunit.result.cache -mergeAndDeploy.sh -start_vagrant.sh -stop_vagrant.sh -ssh_homestead.sh \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..e7c3de9 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,2 @@ +#!/bin/sh +git checkout production && git merge master && git checkout - && git push origin production && ssh -A contabo -t "cd /var/www/shareit.brunofontes.net; git fetch --all; git checkout --force production; git pull origin production --force; ~/composer.phar install -n --optimize-autoloader --no-dev; npm install" diff --git a/ssh_homestead.sh b/ssh_homestead.sh new file mode 100644 index 0000000..2052391 --- /dev/null +++ b/ssh_homestead.sh @@ -0,0 +1 @@ +ssh homestead -t "cd code/Bruno\ Fontes/shareit; bash --login" diff --git a/start_vagrant.sh b/start_vagrant.sh new file mode 100644 index 0000000..13a8e29 --- /dev/null +++ b/start_vagrant.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +builtin cd ~/development/laravelHomestead && /usr/bin/vagrant up && builtin cd - +~/Apps/firefox/firefox-bin http://shareit.test +~/Apps/firefox/firefox-bin https://mailtrap.io/inboxes/455614/messages