mirror of
https://github.com/Yannick7777/codeigniter-setup-script.git
synced 2025-06-25 13:55:32 +02:00
26 lines
438 B
Bash
Executable file
26 lines
438 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ "$(basename $(pwd))" == "igniter" ]]; then
|
|
cd ..
|
|
./switch-branch-migrate "$@"
|
|
cd igniter
|
|
exit
|
|
fi
|
|
|
|
branch_name=$1
|
|
|
|
cd igniter
|
|
|
|
if git show-ref --verify --quiet refs/heads/"$branch_name"; then
|
|
git checkout "$branch_name"
|
|
else
|
|
git checkout -b "$branch_name"
|
|
fi
|
|
|
|
cd ..
|
|
|
|
seeds=$(ls igniter/Seeds)
|
|
|
|
docker compose exec app php spark migrate
|
|
docker compose exec app php spark db:seed App &> /dev/null
|
|
|