mirror of
https://github.com/Yannick7777/codeigniter-setup-script.git
synced 2025-09-09 07:43:03 +02:00
Initial commit
This commit is contained in:
commit
dc46c9e48f
18 changed files with 360 additions and 0 deletions
22
switch-branch-migrate
Executable file
22
switch-branch-migrate
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ "$(basename $(pwd))" == "laravel" ]]; then
|
||||
cd ..
|
||||
./switch-branch-migrate "$@"
|
||||
cd laravel
|
||||
exit
|
||||
fi
|
||||
|
||||
branch_name=$1
|
||||
|
||||
cd laravel
|
||||
|
||||
if git show-ref --verify --quiet refs/heads/"$branch_name"; then
|
||||
git checkout "$branch_name"
|
||||
else
|
||||
git checkout -b "$branch_name"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
docker compose exec app php artisan migrate:fresh --seed
|
Loading…
Add table
Add a link
Reference in a new issue