diff --git a/.gitignore b/.gitignore index d3d4b6fa..60636e44 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ composer.phar /.idea /.vscode +/projects # Laravel Exclude # diff --git a/bin/checkout_latest_projects.sh b/bin/checkout_latest_projects.sh new file mode 100644 index 00000000..1133f58f --- /dev/null +++ b/bin/checkout_latest_projects.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +PROJECTS=( + api +) + +for p in "${PROJECTS[@]}"; do + if [ -d "projects/$p" ]; then + echo "Pulling latest projects updates for $p..." + (cd "projects/$p" && git pull) + else + echo "Cloning $p..." + git clone --single-branch --branch main "https://github.com/laravelcm/$p" "projects/$p" + fi; +done diff --git a/bin/setup.sh b/bin/setup.sh new file mode 100644 index 00000000..7dffaab8 --- /dev/null +++ b/bin/setup.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ ! -f composer.json ]; then + echo "Please make sure to run this script from the root directory of this repo." + exit 1 +fi + +composer install +composer setup +source "$(dirname "$0")/checkout_latest_projects.sh" diff --git a/bin/update.sh b/bin/update.sh new file mode 100644 index 00000000..5d670e05 --- /dev/null +++ b/bin/update.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ ! -f composer.json ]; then + echo "Please make sure to run this script from the root directory of this repo." + exit 1 +fi + +composer install +source "$(dirname "$0")/checkout_latest_projects.sh" diff --git a/composer.json b/composer.json index a48215f9..2e5f3480 100644 --- a/composer.json +++ b/composer.json @@ -74,7 +74,8 @@ "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" + "Database\\Seeders\\": "database/seeders/", + "Domain\\": "src/Domain" } }, "autoload-dev": { @@ -119,7 +120,6 @@ "php -r \"file_exists('.env') || copy('.env.example', '.env');\"", "php artisan key:generate", "php artisan migrate", - "php artisan rinvex:migrate:subscriptions", "php artisan db:seed", "php artisan lcm:admin" ] diff --git a/projects/api/.gitkeep b/src/Domain/Enterprise/.gitkeep similarity index 100% rename from projects/api/.gitkeep rename to src/Domain/Enterprise/.gitkeep diff --git a/src/Domain/Forum/.gitkeep b/src/Domain/Forum/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/Domain/Job/.gitkeep b/src/Domain/Job/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/Domain/Profile/.gitkeep b/src/Domain/Profile/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/Domain/Sponsor/.gitkeep b/src/Domain/Sponsor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/Domain/Subscription/.gitkeep b/src/Domain/Subscription/.gitkeep new file mode 100644 index 00000000..e69de29b