From aeb5831c32272e49de99f35333de0a09f933406c Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Tue, 29 Oct 2019 22:09:49 +0530 Subject: [PATCH] Install ext-psr using apt for phalcon --- node_modules/@actions/core/package.json | 4 ++-- node_modules/@actions/exec/package.json | 4 ++-- node_modules/@actions/io/package.json | 4 ++-- node_modules/@actions/tool-cache/package.json | 4 ++-- node_modules/fs/package.json | 4 ++-- node_modules/semver/package.json | 4 ++-- node_modules/tunnel/package.json | 4 ++-- node_modules/typed-rest-client/package.json | 4 ++-- node_modules/underscore/package.json | 4 ++-- node_modules/uuid/package.json | 4 ++-- package-lock.json | 13 +++++++++---- src/scripts/phalcon.sh | 19 ++++++++++++------- 12 files changed, 41 insertions(+), 31 deletions(-) diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index a1fa7f22..3522669e 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -2,7 +2,7 @@ "_args": [ [ "@actions/core@1.2.0", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "@actions/core@1.2.0", @@ -28,7 +28,7 @@ ], "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz", "_spec": "1.2.0", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json index 0ca3f17f..88b076af 100644 --- a/node_modules/@actions/exec/package.json +++ b/node_modules/@actions/exec/package.json @@ -2,7 +2,7 @@ "_args": [ [ "@actions/exec@1.0.1", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "@actions/exec@1.0.1", @@ -27,7 +27,7 @@ ], "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", "_spec": "1.0.1", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json index 54b43c57..503301d4 100644 --- a/node_modules/@actions/io/package.json +++ b/node_modules/@actions/io/package.json @@ -2,7 +2,7 @@ "_args": [ [ "@actions/io@1.0.1", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "@actions/io@1.0.1", @@ -27,7 +27,7 @@ ], "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz", "_spec": "1.0.1", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/@actions/tool-cache/package.json b/node_modules/@actions/tool-cache/package.json index a784381d..44a99467 100644 --- a/node_modules/@actions/tool-cache/package.json +++ b/node_modules/@actions/tool-cache/package.json @@ -2,7 +2,7 @@ "_args": [ [ "@actions/tool-cache@1.1.2", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "@actions/tool-cache@1.1.2", @@ -27,7 +27,7 @@ ], "_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.1.2.tgz", "_spec": "1.1.2", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/fs/package.json b/node_modules/fs/package.json index 277e58e3..35cb69ca 100644 --- a/node_modules/fs/package.json +++ b/node_modules/fs/package.json @@ -2,7 +2,7 @@ "_args": [ [ "fs@0.0.1-security", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "fs@0.0.1-security", @@ -26,7 +26,7 @@ ], "_resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "_spec": "0.0.1-security", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "author": "", "bugs": { "url": "https://github.com/npm/security-holder/issues" diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json index 41e5f3a3..2d0dbdd3 100644 --- a/node_modules/semver/package.json +++ b/node_modules/semver/package.json @@ -2,7 +2,7 @@ "_args": [ [ "semver@6.3.0", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "semver@6.3.0", @@ -30,7 +30,7 @@ ], "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "_spec": "6.3.0", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bin": { "semver": "./bin/semver.js" }, diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json index 457e8df2..67873a46 100644 --- a/node_modules/tunnel/package.json +++ b/node_modules/tunnel/package.json @@ -2,7 +2,7 @@ "_args": [ [ "tunnel@0.0.4", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "tunnel@0.0.4", @@ -26,7 +26,7 @@ ], "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", "_spec": "0.0.4", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "author": { "name": "Koichi Kobayashi", "email": "koichik@improvement.jp" diff --git a/node_modules/typed-rest-client/package.json b/node_modules/typed-rest-client/package.json index 87b6ddf5..c502180e 100644 --- a/node_modules/typed-rest-client/package.json +++ b/node_modules/typed-rest-client/package.json @@ -2,7 +2,7 @@ "_args": [ [ "typed-rest-client@1.5.0", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "typed-rest-client@1.5.0", @@ -26,7 +26,7 @@ ], "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz", "_spec": "1.5.0", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "author": { "name": "Microsoft Corporation" }, diff --git a/node_modules/underscore/package.json b/node_modules/underscore/package.json index 5f2fc353..2a597c34 100644 --- a/node_modules/underscore/package.json +++ b/node_modules/underscore/package.json @@ -2,7 +2,7 @@ "_args": [ [ "underscore@1.8.3", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "underscore@1.8.3", @@ -26,7 +26,7 @@ ], "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "_spec": "1.8.3", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "author": { "name": "Jeremy Ashkenas", "email": "jeremy@documentcloud.org" diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json index e041bfe6..9f00d4b1 100644 --- a/node_modules/uuid/package.json +++ b/node_modules/uuid/package.json @@ -2,7 +2,7 @@ "_args": [ [ "uuid@3.3.3", - "C:\\wamp64\\www\\setup-php" + "E:\\python\\setup-php" ] ], "_from": "uuid@3.3.3", @@ -27,7 +27,7 @@ ], "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", "_spec": "3.3.3", - "_where": "C:\\wamp64\\www\\setup-php", + "_where": "E:\\python\\setup-php", "bin": { "uuid": "./bin/uuid" }, diff --git a/package-lock.json b/package-lock.json index 9c666653..6fed9501 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1798,7 +1798,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2213,7 +2214,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2269,6 +2271,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2312,12 +2315,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/src/scripts/phalcon.sh b/src/scripts/phalcon.sh index 073a8fa6..6b9a08d0 100644 --- a/src/scripts/phalcon.sh +++ b/src/scripts/phalcon.sh @@ -1,19 +1,24 @@ ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g") -sudo DEBIAN_FRONTEND=noninteractive apt install php"$2"-dev -y +if [ ! "$(apt-cache search php"$2"-psr)" ]; then + sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/php -y >/dev/null 2>&1 +fi +sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev php"$2"-psr for tool in php-config phpize; do if [ -e "/usr/bin/$tool$2" ]; then sudo update-alternatives --set $tool /usr/bin/"$tool$2" fi done -cd ~ && git clone --depth=1 https://github.com/jbboehr/php-psr.git -cd php-psr && sudo /usr/bin/phpize"$2" -./configure --with-php-config=/usr/bin/php-config"$2" -make -j2 && sudo make -j2 install -echo "extension=psr.so" >> "$ini_file" +if [ ! "$(apt-cache search php"$2"-psr)" ]; then + cd ~ && git clone --depth=1 https://github.com/jbboehr/php-psr.git + cd php-psr && sudo /usr/bin/phpize"$2" + ./configure --with-php-config=/usr/bin/php-config"$2" + make -j2 && sudo make -j2 install + echo "extension=psr.so" >> "$ini_file" +fi if [ "$1" = "master" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt install php"$2"-phalcon -y + sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-phalcon else cd ~ && git clone --depth=1 -v https://github.com/phalcon/cphalcon.git -b "$1" cd cphalcon/build && sudo ./install --phpize /usr/bin/phpize"$2" --php-config /usr/bin/php-config"$2"