Sfoglia il codice sorgente

Merge pull request #879 from daef/master

Mark Shust 2 anni fa
parent
commit
f957d12a4b
54 ha cambiato i file con 55 aggiunte e 55 eliminazioni
  1. 2 2
      compose/Makefile
  2. 1 1
      compose/bin/analyse
  3. 1 1
      compose/bin/bash
  4. 1 1
      compose/bin/cache-clean
  5. 1 1
      compose/bin/cli
  6. 1 1
      compose/bin/clinotty
  7. 1 1
      compose/bin/cliq
  8. 1 1
      compose/bin/composer
  9. 1 1
      compose/bin/copyfromcontainer
  10. 1 1
      compose/bin/copytocontainer
  11. 1 1
      compose/bin/cron
  12. 1 1
      compose/bin/dev-test-run
  13. 1 1
      compose/bin/dev-urn-catalog-generate
  14. 1 1
      compose/bin/devconsole
  15. 1 1
      compose/bin/docker-compose
  16. 1 1
      compose/bin/download
  17. 1 1
      compose/bin/fixowns
  18. 1 1
      compose/bin/fixperms
  19. 1 1
      compose/bin/grunt
  20. 1 1
      compose/bin/install-php-extensions
  21. 1 1
      compose/bin/magento
  22. 1 1
      compose/bin/mftf
  23. 1 1
      compose/bin/mysql
  24. 1 1
      compose/bin/mysqldump
  25. 1 1
      compose/bin/n98-magerun2
  26. 1 1
      compose/bin/node
  27. 1 1
      compose/bin/npm
  28. 1 1
      compose/bin/phpcbf
  29. 1 1
      compose/bin/phpcs
  30. 1 1
      compose/bin/phpcs-json-report
  31. 1 1
      compose/bin/pwa-studio
  32. 1 1
      compose/bin/redis
  33. 1 1
      compose/bin/remove
  34. 1 1
      compose/bin/removeall
  35. 1 1
      compose/bin/removevolumes
  36. 1 1
      compose/bin/restart
  37. 1 1
      compose/bin/root
  38. 1 1
      compose/bin/rootnotty
  39. 1 1
      compose/bin/setup
  40. 1 1
      compose/bin/setup-composer-auth
  41. 1 1
      compose/bin/setup-domain
  42. 1 1
      compose/bin/setup-grunt
  43. 1 1
      compose/bin/setup-integration-tests
  44. 1 1
      compose/bin/setup-pwa-studio
  45. 1 1
      compose/bin/setup-ssl
  46. 1 1
      compose/bin/setup-ssl-ca
  47. 1 1
      compose/bin/start
  48. 1 1
      compose/bin/status
  49. 1 1
      compose/bin/stop
  50. 1 1
      compose/bin/stopall
  51. 1 1
      compose/bin/update
  52. 1 1
      compose/bin/xdebug
  53. 1 1
      lib/onelinesetup
  54. 1 1
      lib/template

+ 2 - 2
compose/Makefile

@@ -1,4 +1,4 @@
-SHELL := /bin/bash
+SHELL := /usr/bin/env bash
 
 
 args = `arg="$(filter-out $(firstword $(MAKECMDGOALS)),$(MAKECMDGOALS))" && echo $${arg:-${1}}`
 args = `arg="$(filter-out $(firstword $(MAKECMDGOALS)),$(MAKECMDGOALS))" && echo $${arg:-${1}}`
 
 
@@ -64,7 +64,7 @@ help:
 	@echo "$(call format,xdebug,'Disable or enable Xdebug.')"
 	@echo "$(call format,xdebug,'Disable or enable Xdebug.')"
 
 
 bash:
 bash:
-	@./bin/bash
+	@./usr/bin/env bash
 
 
 cache-clean:
 cache-clean:
 	@./bin/cache-clean $(call args)
 	@./bin/cache-clean $(call args)

+ 1 - 1
compose/bin/analyse

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli vendor/bin/phpstan analyse "$@"
 bin/cli vendor/bin/phpstan analyse "$@"

+ 1 - 1
compose/bin/bash

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli bash
 bin/cli bash

+ 1 - 1
compose/bin/cache-clean

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 COMPOSER_GLOBAL=/var/www/.composer-global
 COMPOSER_GLOBAL=/var/www/.composer-global
 CACHE_CLEAN=${COMPOSER_GLOBAL}/vendor/bin/cache-clean.js
 CACHE_CLEAN=${COMPOSER_GLOBAL}/vendor/bin/cache-clean.js
 
 

+ 1 - 1
compose/bin/cli

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 bin/docker-compose exec phpfpm "$@"
 bin/docker-compose exec phpfpm "$@"

+ 1 - 1
compose/bin/clinotty

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 # -T: Disable pseudo-tty allocation
 # -T: Disable pseudo-tty allocation
 bin/docker-compose exec -T phpfpm "$@"
 bin/docker-compose exec -T phpfpm "$@"

+ 1 - 1
compose/bin/cliq

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 # Without stdout and stderr
 # Without stdout and stderr
 bin/clinotty "$@" >/dev/null 2>&1
 bin/clinotty "$@" >/dev/null 2>&1

+ 1 - 1
compose/bin/composer

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli composer "$@"
 bin/cli composer "$@"

+ 1 - 1
compose/bin/copyfromcontainer

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a directory or file to copy from container (ex. vendor, --all)" && exit
 [ -z "$1" ] && echo "Please specify a directory or file to copy from container (ex. vendor, --all)" && exit
 
 
 REAL_SRC=$(cd -P "src" && pwd)
 REAL_SRC=$(cd -P "src" && pwd)

+ 1 - 1
compose/bin/copytocontainer

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a directory or file to copy to container (ex. vendor, --all)" && exit
 [ -z "$1" ] && echo "Please specify a directory or file to copy to container (ex. vendor, --all)" && exit
 
 
 REAL_SRC=$(cd -P "src" && pwd)
 REAL_SRC=$(cd -P "src" && pwd)

+ 1 - 1
compose/bin/cron

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a service operation (start|stop|status|restart|reload|force-reload)" && exit
 [ -z "$1" ] && echo "Please specify a service operation (start|stop|status|restart|reload|force-reload)" && exit
 bin/root service cron "$@"
 bin/root service cron "$@"
 bin/root touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status
 bin/root touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status

+ 1 - 1
compose/bin/dev-test-run

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 [ -z "$1" ] && echo "Please specify test type (ex. integration)" && exit
 [ -z "$1" ] && echo "Please specify test type (ex. integration)" && exit
 
 

+ 1 - 1
compose/bin/dev-urn-catalog-generate

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/magento dev:urn-catalog:generate misc.xml
 bin/magento dev:urn-catalog:generate misc.xml
 bin/copyfromcontainer misc.xml
 bin/copyfromcontainer misc.xml
 mkdir -p src/.idea
 mkdir -p src/.idea

+ 1 - 1
compose/bin/devconsole

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/n98-magerun2 dev:console
 bin/n98-magerun2 dev:console

+ 1 - 1
compose/bin/docker-compose

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 if docker compose version > /dev/null 2>&1; then
 if docker compose version > /dev/null 2>&1; then
   DOCKER_COMPOSE="docker compose"
   DOCKER_COMPOSE="docker compose"

+ 1 - 1
compose/bin/download

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 VERSION=${1:-2.4.5-p1}
 VERSION=${1:-2.4.5-p1}
 EDITION=${2:-community}
 EDITION=${2:-community}

+ 1 - 1
compose/bin/fixowns

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 echo "Fixing filesystem ownerships..."
 echo "Fixing filesystem ownerships..."
 
 
 if [ -z "$1" ]; then
 if [ -z "$1" ]; then

+ 1 - 1
compose/bin/fixperms

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 echo "Fixing filesystem permissions..."
 echo "Fixing filesystem permissions..."
 
 
 if [ -z "$1" ]; then
 if [ -z "$1" ]; then

+ 1 - 1
compose/bin/grunt

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli npx grunt "$@"
 bin/cli npx grunt "$@"

+ 1 - 1
compose/bin/install-php-extensions

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 if ! bin/cliq ls /usr/local/bin/install-php-extensions; then
 if ! bin/cliq ls /usr/local/bin/install-php-extensions; then
   echo "Downloading install-php-extensions, just a moment..."
   echo "Downloading install-php-extensions, just a moment..."
   bin/rootnotty curl -sSLf \
   bin/rootnotty curl -sSLf \

+ 1 - 1
compose/bin/magento

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli bin/magento "$@"
 bin/cli bin/magento "$@"

+ 1 - 1
compose/bin/mftf

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/clinotty vendor/bin/mftf "$@"
 bin/clinotty vendor/bin/mftf "$@"

+ 1 - 1
compose/bin/mysql

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 # shellcheck source=../env/db.env
 # shellcheck source=../env/db.env
 source env/db.env
 source env/db.env

+ 1 - 1
compose/bin/mysqldump

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/n98-magerun2 db:dump --stdout "$@"
 bin/n98-magerun2 db:dump --stdout "$@"

+ 1 - 1
compose/bin/n98-magerun2

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 if ! bin/cliq ls bin/n98-magerun2.phar; then
 if ! bin/cliq ls bin/n98-magerun2.phar; then
   echo "Downloading n98-magerun2.phar, just a moment..."
   echo "Downloading n98-magerun2.phar, just a moment..."
   bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar
   bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar

+ 1 - 1
compose/bin/node

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli node "$@"
 bin/cli node "$@"

+ 1 - 1
compose/bin/npm

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/cli npm "$@"
 bin/cli npm "$@"

+ 1 - 1
compose/bin/phpcbf

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/clinotty vendor/bin/phpcbf --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"
 bin/clinotty vendor/bin/phpcbf --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"

+ 1 - 1
compose/bin/phpcs

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"
 bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"

+ 1 - 1
compose/bin/phpcs-json-report

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations --report=json "$@" > report.json
 bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations --report=json "$@" > report.json

+ 1 - 1
compose/bin/pwa-studio

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 
 
 if [ ! -d pwa-studio ]; then
 if [ ! -d pwa-studio ]; then

+ 1 - 1
compose/bin/redis

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/docker-compose exec redis "$@"
 bin/docker-compose exec redis "$@"

+ 1 - 1
compose/bin/remove

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/docker-compose rm
 bin/docker-compose rm

+ 1 - 1
compose/bin/removeall

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/stopall
 bin/stopall
 bin/remove
 bin/remove
 bin/removevolumes
 bin/removevolumes

+ 1 - 1
compose/bin/removevolumes

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 current_folder=${PWD##*/}
 current_folder=${PWD##*/}
 volume_prefix=$(echo "$current_folder" | awk '{print tolower($0)}' | sed 's/\.//g')
 volume_prefix=$(echo "$current_folder" | awk '{print tolower($0)}' | sed 's/\.//g')
 docker volume rm "${volume_prefix}"_appdata
 docker volume rm "${volume_prefix}"_appdata

+ 1 - 1
compose/bin/restart

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/stop "$@"
 bin/stop "$@"
 bin/start "$@"
 bin/start "$@"

+ 1 - 1
compose/bin/root

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 bin/docker-compose exec -u root phpfpm "$@"
 bin/docker-compose exec -u root phpfpm "$@"

+ 1 - 1
compose/bin/rootnotty

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 bin/docker-compose exec -u root -T phpfpm "$@"
 bin/docker-compose exec -u root -T phpfpm "$@"

+ 1 - 1
compose/bin/setup

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 
 
 MEM_BYTES=$(docker info -f '{{.MemTotal}}')
 MEM_BYTES=$(docker info -f '{{.MemTotal}}')

+ 1 - 1
compose/bin/setup-composer-auth

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 MAGENTO_USERNAME_PROP="http-basic.repo.magento.com.username"
 MAGENTO_USERNAME_PROP="http-basic.repo.magento.com.username"
 MAGENTO_PASSWORD_PROP="http-basic.repo.magento.com.password"
 MAGENTO_PASSWORD_PROP="http-basic.repo.magento.com.password"
 hash composer 2>/dev/null && IS_COMPOSER_ON_HOST=true
 hash composer 2>/dev/null && IS_COMPOSER_ON_HOST=true

+ 1 - 1
compose/bin/setup-domain

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 
 
 [ -z "$1" ] && echo "Please specify a domain name (ex. magento.test)" && exit
 [ -z "$1" ] && echo "Please specify a domain name (ex. magento.test)" && exit

+ 1 - 1
compose/bin/setup-grunt

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 echo "Confirming n98-magerun2 is installed..."
 echo "Confirming n98-magerun2 is installed..."
 bin/n98-magerun2 > /dev/null 2>&1
 bin/n98-magerun2 > /dev/null 2>&1
 
 

+ 1 - 1
compose/bin/setup-integration-tests

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 # shellcheck source=../env/db.env
 # shellcheck source=../env/db.env
 source env/db.env
 source env/db.env

+ 1 - 1
compose/bin/setup-pwa-studio

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 echo "Install NodeJS and Yarn on host machine, otherwise setup will fail"
 echo "Install NodeJS and Yarn on host machine, otherwise setup will fail"
 
 

+ 1 - 1
compose/bin/setup-ssl

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a domain (ex. mydomain.test)" && exit
 [ -z "$1" ] && echo "Please specify a domain (ex. mydomain.test)" && exit
 
 
 # Generate certificate authority if not already setup
 # Generate certificate authority if not already setup

+ 1 - 1
compose/bin/setup-ssl-ca

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 # Generate a new local CA "/root/.local/share/mkcert"
 # Generate a new local CA "/root/.local/share/mkcert"
 bin/docker-compose exec -T -u root app mkcert -install
 bin/docker-compose exec -T -u root app mkcert -install

+ 1 - 1
compose/bin/start

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 
 
 MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
 MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)

+ 1 - 1
compose/bin/status

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/docker-compose ps
 bin/docker-compose ps

+ 1 - 1
compose/bin/stop

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 bin/docker-compose stop "$@"
 bin/docker-compose stop "$@"

+ 1 - 1
compose/bin/stopall

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 if [ -z "$(docker ps -q)" ]; then
 if [ -z "$(docker ps -q)" ]; then
     echo "You have no running container"
     echo "You have no running container"
 else
 else

+ 1 - 1
compose/bin/update

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 mkdir -p tmpupdate && cd "$_"
 mkdir -p tmpupdate && cd "$_"
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash

+ 1 - 1
compose/bin/xdebug

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 S=$(bin/clinotty cat /usr/local/etc/php/php.ini | grep -iGc 'xdebug.mode = off');
 S=$(bin/clinotty cat /usr/local/etc/php/php.ini | grep -iGc 'xdebug.mode = off');
 
 

+ 1 - 1
lib/onelinesetup

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -o errexit
 set -o errexit
 
 
 DOMAIN=${1:-magento.test}
 DOMAIN=${1:-magento.test}

+ 1 - 1
lib/template

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 git init -qqq
 git init -qqq
 git remote add origin https://github.com/markshust/docker-magento
 git remote add origin https://github.com/markshust/docker-magento
 git fetch origin -qqq
 git fetch origin -qqq