From 27cc670152945c30341cd6e1002efa55b33a6e5f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 8 Oct 2020 17:13:16 +0100 Subject: [PATCH] Remove old Symfony server files --- .php-version | 1 - Makefile | 55 ----------------------------------------- bin/common.sh | 14 ----------- bin/composer.sh | 3 --- bin/config-export.sh | 7 ------ bin/drush.sh | 5 ---- bin/install.sh | 15 ----------- bin/refresh.sh | 5 ---- bin/run-tests.sh | 21 ---------------- bin/theme-build-dev.sh | 9 ------- bin/theme-build-prod.sh | 9 ------- docker-compose.yaml | 13 ---------- php.ini | 2 -- 13 files changed, 159 deletions(-) delete mode 100644 .php-version delete mode 100644 Makefile delete mode 100644 bin/common.sh delete mode 100755 bin/composer.sh delete mode 100755 bin/config-export.sh delete mode 100755 bin/drush.sh delete mode 100755 bin/install.sh delete mode 100755 bin/refresh.sh delete mode 100755 bin/run-tests.sh delete mode 100755 bin/theme-build-dev.sh delete mode 100755 bin/theme-build-prod.sh delete mode 100644 docker-compose.yaml delete mode 100644 php.ini diff --git a/.php-version b/.php-version deleted file mode 100644 index 37722eb..0000000 --- a/.php-version +++ /dev/null @@ -1 +0,0 @@ -7.4 diff --git a/Makefile b/Makefile deleted file mode 100644 index 0e79819..0000000 --- a/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -SHELL=/bin/bash -e -o pipefail - -THEME_PATH:=web/themes/custom/opdavies - -.PHONY: * - -clean: theme-clean - -phpcs: - @vendor/bin/phpcs -s --warning-severity=6 - -phpstan: - vendor/bin/phpstan analyze - -phpunit: - vendor/bin/phpunit web/modules/custom - -pull-from-prod: - # Download and import the database. - ansible-playbook tools/ansible/download-database.yml - zcat < dump.sql.gz | bin/drush.sh sql-cli - rm dump.sql.gz - - # Post import steps. - bin/drush.sh sql-sanitize -y --sanitize-password=password - bin/drush.sh updatedb -y - bin/drush.sh cache-rebuild - bin/drush.sh user-login 1 - -start: - docker-compose up -d - symfony server:start -d - -stop: - symfony server:stop - docker-compose down - -test: phpstan phpunit phpcs - -theme-build: theme-install-dependencies - cd ${THEME_PATH} && npm run dev - -theme-build-prod: theme-install-dependencies - bin/drush.sh opdavies:export-body-values-for-theme-purging - cd ${THEME_PATH} && npm run prod - -theme-clean: ${THEME_PATH}/build ${THEME_PATH}/node_modules - rm -fr ${THEME_PATH}/build - rm -fr ${THEME_PATH}/node_modules - -theme-install-dependencies: ${THEME_PATH}/package.json ${THEME_PATH}/package-lock.json - cd ${THEME_PATH} && npm install - -theme-watch: theme-build - cd ${THEME_PATH} && npm run watch diff --git a/bin/common.sh b/bin/common.sh deleted file mode 100644 index 1dafc4b..0000000 --- a/bin/common.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -e - -theme_path="web/themes/custom/opdavies" - -function run_command { - title=$1 - command=$2 - - echo -e "\e[32m$title\e[0m" - echo -e "\e[33mExecuting: \e[0m$command" - $command -} diff --git a/bin/composer.sh b/bin/composer.sh deleted file mode 100755 index 1e48c3d..0000000 --- a/bin/composer.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -symfony composer "$@" diff --git a/bin/config-export.sh b/bin/config-export.sh deleted file mode 100755 index e662bed..0000000 --- a/bin/config-export.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd web - -symfony php ../vendor/bin/drush config-export -y diff --git a/bin/drush.sh b/bin/drush.sh deleted file mode 100755 index f83fd50..0000000 --- a/bin/drush.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -cd web - -symfony php ../vendor/bin/drush "$@" diff --git a/bin/install.sh b/bin/install.sh deleted file mode 100755 index 3827a18..0000000 --- a/bin/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -. $(dirname "$0")/common.sh - -run_command "Install Composer dependencies" "symfony composer install" - -pushd $theme_path -run_command "Install theme dependencies" "symfony run npm install" -popd - -pushd web -run_command "Install Drupal" "symfony php ../vendor/bin/drush site-install -y --existing-config" -popd diff --git a/bin/refresh.sh b/bin/refresh.sh deleted file mode 100755 index 76cf03c..0000000 --- a/bin/refresh.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -./bin/drush.sh site:install -y \ - --existing-config \ - --account-pass=admin123 diff --git a/bin/run-tests.sh b/bin/run-tests.sh deleted file mode 100755 index bf9b8ad..0000000 --- a/bin/run-tests.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -e - -symfony php vendor/bin/phpcs -n \ - --standard="Drupal,DrupalPractice" \ - --extensions="php,module,inc,install,test,profile,theme" \ - --ignore=*/tests/* \ - --exclude="Drupal.Commenting.ClassComment,Drupal.Commenting.FunctionComment" \ - web/modules/custom - -symfony php vendor/bin/phpcs -n \ - --standard="Drupal,DrupalPractice" \ - --extensions="php,module,inc,install,test,profile,theme" \ - --exclude="Drupal.Commenting.ClassComment,Drupal.Commenting.DocComment,Drupal.Commenting.FunctionComment,Drupal.NamingConventions.ValidFunctionName" \ - web/modules/custom/**/tests - -vendor/bin/phpstan analyze - -symfony php vendor/bin/phpunit \ - "$@" diff --git a/bin/theme-build-dev.sh b/bin/theme-build-dev.sh deleted file mode 100755 index c80e2a4..0000000 --- a/bin/theme-build-dev.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -e - -. $(dirname "$0")/common.sh - -cd $theme_path - -npm run development diff --git a/bin/theme-build-prod.sh b/bin/theme-build-prod.sh deleted file mode 100755 index 9b43cfa..0000000 --- a/bin/theme-build-prod.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -e - -. $(dirname "$0")/common.sh - -cd $theme_path - -npm run prod diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index d7b4f54..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: '2.1' - -services: - database: - image: mysql:5.7 - ports: [3306] - environment: - MYSQL_ROOT_PASSWORD: secret - volumes: - - mysql-data:/var/lib/mysql - -volumes: - mysql-data: diff --git a/php.ini b/php.ini deleted file mode 100644 index 4143154..0000000 --- a/php.ini +++ /dev/null @@ -1,2 +0,0 @@ -[Date] -date.timezone = Europe/London