From 29cb83540016b6c6357a306e1d0a6ac25e20f500 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 7 Dec 2017 16:34:36 +0100 Subject: [PATCH] upd: config.modules|api.module.dev (added auto-release (git pull) with url trigger) --- build/api/module/dev.php | 8 ++++++++ config/modules.json | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/build/api/module/dev.php b/build/api/module/dev.php index a16481c..3339fbc 100644 --- a/build/api/module/dev.php +++ b/build/api/module/dev.php @@ -25,4 +25,12 @@ class dev{ return ['notice' => 'reload the website NOW !!']; } + public function GET_release($argv){ + extract($argv); + + \chdir(__ROOT__); + + return [ 'stdout' => \shell_exec("git pull origin master") ]; + } + } diff --git a/config/modules.json b/config/modules.json index 79d11b9..01e3631 100755 --- a/config/modules.json +++ b/config/modules.json @@ -90,6 +90,13 @@ "permissions": [], "parameters": {}, "output": {} + }, + + "GET release": { + "description": "Auto release git repo", + "permissions": [], + "parameters": {}, + "output": {} } },