From db0cd5479721db52a2d89492beed4e116cfd402f Mon Sep 17 00:00:00 2001 From: "dps.lwk" Date: Sat, 21 Dec 2019 14:38:30 +0000 Subject: [PATCH 1/5] Add support for laravel 6 --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index efadb08..66bc892 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,9 @@ } }, "require": { - "illuminate/http": "~5", - "illuminate/config": "~5", - "illuminate/support": "~5" + "illuminate/http": "~5|^6.0", + "illuminate/config": "~5|^6.0", + "illuminate/support": "~5|^6.0" }, "extra": { "laravel": { From b75738a6db527935fc59a40d45b2c91b8955ce3c Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Mon, 13 Jan 2020 20:51:51 +0000 Subject: [PATCH 2/5] README typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 569659d..530ebf4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Deployment of Laravel projects using Git webhooks -git-deploy-laravel allow for automated deployment using webhook requests from your repository's server, and automatically pulling project code using the local Git binary. +git-deploy-laravel allows for automated deployment using webhook requests from your repository's server, and automatically pulls project code using the local Git binary. This should work out-of-the-box with Laravel 5.x using with webhooks from GitHub and GitLab servers. From d7b3ec2b47d122dbd37c9dea9d802522b0b5e0fa Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Thu, 10 Jun 2021 23:03:29 +0100 Subject: [PATCH 3/5] Support newer versions of Laravel Framework --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 66bc892..47f71a3 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,9 @@ } }, "require": { - "illuminate/http": "~5|^6.0", - "illuminate/config": "~5|^6.0", - "illuminate/support": "~5|^6.0" + "illuminate/http": "~5|^6.0|^7.0|^8.0", + "illuminate/config": "~5|^6.0|^7.0|^8.0", + "illuminate/support": "~5|^6.0|^7.0|^8.0" }, "extra": { "laravel": { From bd75462c3106ae045c33cd406f0feb971bbb4f9e Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 11 Jun 2021 09:18:12 +0100 Subject: [PATCH 4/5] Proper PSR4 namespacing --- src/{events => Events}/GitDeployed.php | 0 src/{http => Http}/GitDeployController.php | 0 src/{http => Http}/routes.php | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename src/{events => Events}/GitDeployed.php (100%) rename src/{http => Http}/GitDeployController.php (100%) rename src/{http => Http}/routes.php (100%) diff --git a/src/events/GitDeployed.php b/src/Events/GitDeployed.php similarity index 100% rename from src/events/GitDeployed.php rename to src/Events/GitDeployed.php diff --git a/src/http/GitDeployController.php b/src/Http/GitDeployController.php similarity index 100% rename from src/http/GitDeployController.php rename to src/Http/GitDeployController.php diff --git a/src/http/routes.php b/src/Http/routes.php similarity index 100% rename from src/http/routes.php rename to src/Http/routes.php From 02dde2f2d8ab33ac68efeb67718d22e45c6c8faa Mon Sep 17 00:00:00 2001 From: Ed Jeavons Date: Sun, 19 Sep 2021 13:44:47 +0100 Subject: [PATCH 5/5] Fix compatibility fail while requiring package. Also set to min. Laravel 5.5 to simplify things --- .gitignore | 1 - README.md | 10 +------- composer.json | 36 +++++++++++++-------------- src/Http/routes.php => routes/web.php | 2 ++ src/Events/GitDeployed.php | 3 +-- src/GitDeployServiceProvider.php | 2 +- 6 files changed, 22 insertions(+), 32 deletions(-) delete mode 100644 .gitignore rename src/Http/routes.php => routes/web.php (69%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e43b0f9..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store diff --git a/README.md b/README.md index 530ebf4..61b7c0c 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,6 @@ Or run: ### Step 2 -Add the following line to you providers in `config/app.php`: - - Orphans\GitDeploy\GitDeployServiceProvider::class, - -** New in Laravel 5.5 - Service provide should be automatically detected without the above change ** - -### Step 3 - Add the _/git-deploy_ route to CSRF exceptions so your repo's host can send messages to your project. @@ -42,7 +34,7 @@ In file in `app/Http/Middleware/VerifyCsrfToken.php` add: 'git-deploy', ]; -### Step 4 Optional +### Step 3 Optional In case you need additional action after a successful commit, you can add you own Event Listener. For example you can write your own update script to run migrations etc. diff --git a/composer.json b/composer.json index 47f71a3..fa8103e 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,20 @@ { - "name": "orphans/git-deploy-laravel", - "description": "Helps automate the deployment of projects onto servers by utilising Git web hooks.", - "license": "MIT", - "autoload": { - "psr-4": { - "Orphans\\GitDeploy\\": "src" - } - }, - "require": { - "illuminate/http": "~5|^6.0|^7.0|^8.0", - "illuminate/config": "~5|^6.0|^7.0|^8.0", - "illuminate/support": "~5|^6.0|^7.0|^8.0" - }, - "extra": { - "laravel": { - "providers": [ - "Orphans\\GitDeploy\\GitDeployServiceProvider" - ] - } + "name": "orphans/git-deploy-laravel", + "description": "Helps automate the deployment of projects onto servers by utilising Git web hooks.", + "license": "MIT", + "autoload": { + "psr-4": { + "Orphans\\GitDeploy\\": "src" } + }, + "require": { + "illuminate/support": "^5.5|^6.0|^7.0|^8.0" + }, + "extra": { + "laravel": { + "providers": [ + "Orphans\\GitDeploy\\GitDeployServiceProvider" + ] + } + } } diff --git a/src/Http/routes.php b/routes/web.php similarity index 69% rename from src/Http/routes.php rename to routes/web.php index 230ab16..0fd6e83 100644 --- a/src/Http/routes.php +++ b/routes/web.php @@ -1,3 +1,5 @@ commits = $commits; } -} \ No newline at end of file +} diff --git a/src/GitDeployServiceProvider.php b/src/GitDeployServiceProvider.php index 975b073..74006c4 100644 --- a/src/GitDeployServiceProvider.php +++ b/src/GitDeployServiceProvider.php @@ -16,7 +16,7 @@ public function boot() $this->publishes([ __dir__ . '/../config/gitdeploy.php' => config_path('gitdeploy.php') ], 'config'); - $this->loadRoutesFrom(__dir__ . '/http/routes.php'); + $this->loadRoutesFrom(__dir__ . '/../routes/web.php'); $this->loadViewsFrom(__dir__ . '/views', 'gitdeploy'); }