Skip to content

Commit

Permalink
Renamed several variables. (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Oct 22, 2023
1 parent 5068e99 commit 3ca0693
Show file tree
Hide file tree
Showing 42 changed files with 408 additions and 381 deletions.
10 changes: 5 additions & 5 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,21 @@ commands:
fei:
usage: Install front-end assets.
cmd: ahoy cli "npm --prefix ${DREVOPS_WEBROOT}/themes/custom/${DREVOPS_DRUPAL_THEME} install"
cmd: ahoy cli "npm --prefix ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} install"

fe:
usage: Build front-end assets.
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DREVOPS_DRUPAL_THEME} && npm run build"
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build"

fed:
usage: Build front-end assets for development.
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DREVOPS_DRUPAL_THEME} && npm run build-dev"
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build-dev"

few:
usage: Watch front-end assets during development.
cmd: |
ahoy cli "pkill -9 -f grunt" || true
ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DREVOPS_DRUPAL_THEME} && npm run watch"
ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run watch"
lint:
usage: Lint back-end and front-end code.
Expand All @@ -193,7 +193,7 @@ commands:
usage: Lint front-end code.
cmd: |
ahoy cli vendor/bin/twigcs
ahoy cli "npm run --prefix \${DREVOPS_WEBROOT}/themes/custom/\${DREVOPS_DRUPAL_THEME} lint"
ahoy cli "npm run --prefix \${DREVOPS_WEBROOT}/themes/custom/\${DRUPAL_THEME} lint"
test:
usage: Run all tests.
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ jobs:
command: docker compose exec -T cli vendor/bin/twigcs || [ "${DREVOPS_CI_TWIGCS_IGNORE_FAILURE:-0}" -eq 1 ]
- run:
name: Lint code with NPM linters
command: docker compose exec -T cli bash -c "npm run --prefix \${DREVOPS_WEBROOT}/themes/custom/\${DREVOPS_DRUPAL_THEME} lint" || [ "${DREVOPS_CI_NPM_LINT_IGNORE_FAILURE:-0}" -eq 1 ]
command: docker compose exec -T cli bash -c "npm run --prefix \${DREVOPS_WEBROOT}/themes/custom/\${DRUPAL_THEME} lint" || [ "${DREVOPS_CI_NPM_LINT_IGNORE_FAILURE:-0}" -eq 1 ]
- run:
name: Test with PHPUnit
command: |
Expand Down
31 changes: 29 additions & 2 deletions .drevops/docs/.utils/variables/extra/.env.variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,39 @@ DREVOPS_DB_DOCKER_IMAGE=
DREVOPS_DB_DOCKER_IMAGE_BASE=

# Drupal admin email. May need to be reset if database was sanitized.
DREVOPS_DRUPAL_ADMIN_EMAIL="webmaster@your-site-url.example"
DRUPAL_ADMIN_EMAIL="webmaster@your-site-url.example"

# Password replacement used for sanitised database.
DREVOPS_DRUPAL_DB_SANITIZE_PASSWORD="<RANDOM STRING>"
DREVOPS_PROVISION_SANITIZE_DB_PASSWORD="<RANDOM STRING>"

# Docker registry name.
#
# Provide port, if required as `<server_name>:<port>`.
DOCKER_REGISTRY="${DOCKER_REGISTRY:-docker.io}"

# Unblock admin account when logging in.
DRUPAL_UNBLOCK_ADMIN=1

# Drupal admin email. May need to be reset if database was sanitized.
DRUPAL_ADMIN_EMAIL=

# Replace username with email after databasse sanitization. Useful when email
# is used as username.
DREVOPS_PROVISION_SANITIZE_DB_REPLACE_USERNAME_WITH_EMAIL=0

# Drupal site name.
# Used only when installing from profile.
DRUPAL_SITE_NAME="${DREVOPS_PROJECT}"

# Drupal site email.
# Used only when installing from profile.
DRUPAL_SITE_EMAIL="webmaster@your-site-url.example"

# Print output from Docker build.
DREVOPS_DOCKER_VERBOSE=1

# Print output from Composer install.
DREVOPS_COMPOSER_VERBOSE=1

# Print output from NPM install.
DREVOPS_NPM_VERBOSE=0
14 changes: 9 additions & 5 deletions .drevops/docs/.utils/variables/extra/environment.variables.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/usr/bin/env bash
##
# Additional environment variables used in this project from the environment.
# Additional environment variables discovered from the current environment.
# shellcheck disable=SC2034

# Docker Compose project name (all containers will have this name). Defaults
# to the name of the project directory.
# Docker Compose project name.
#
# Sets the project name for a Docker Compose project. Influences container and
# network names.
#
# Defaults to the name of the project directory.
COMPOSE_PROJECT_NAME=

# Override detected environment type.
# Override detected Drupal environment type.
#
# Used in the application to override the automatically detected environment type.
DREVOPS_ENVIRONMENT=
DRUPAL_ENVIRONMENT=
2 changes: 1 addition & 1 deletion .drevops/docs/content/contributing/maintenance/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Some tests use test fixtures such as Drupal database snapshots.

1. Run fresh build of DrevOps locally:
```bash
echo "DREVOPS_DRUPAL_PROFILE=standard">>.env.local
echo "DRUPAL_PROFILE=standard">>.env.local
echo "DREVOPS_PROVISION_USE_PROFILE=1">>.env.local
rm .data/db.sql
AHOY_CONFIRM_RESPONSE=1 ahoy build
Expand Down
4 changes: 2 additions & 2 deletions .drevops/docs/content/drupal/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ This value is then overridden by the environment detection logic.
#### Environment detection override

It is also possible to force specific environment by setting
`DREVOPS_ENVIRONMENT` environment variable. In this case, the environment
`DRUPAL_ENVIRONMENT` environment variable. In this case, the environment
detection will take place and will load any additional per-platform settings,
but the final value of `$settings['environment']` will be set to the value of
`DREVOPS_ENVIRONMENT` variable.
`DRUPAL_ENVIRONMENT` variable.

This is useful in cases where a certain behaviour is required for a specific
environment, but the environment detection logic does not provide it. Or as a
Expand Down
2 changes: 1 addition & 1 deletion .drevops/docs/content/workflows/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ increases the build time).

### 8. Is theme available?

If the environment variable `$DREVOPS_DRUPAL_THEME` is set, the script will
If the environment variable `$DRUPAL_THEME` is set, the script will
install the front-end dependencies and compile assets. Note that this already
happens during the Docker build process, so this step runs **only locally**
to update the assets to use development versions based on the current theme
Expand Down
Loading

0 comments on commit 3ca0693

Please sign in to comment.