Skip to content

Instantly share code, notes, and snippets.

@esolitos
Created November 11, 2021 14:39
Show Gist options
  • Save esolitos/c4fa8500eb88bf33a76278849ad39775 to your computer and use it in GitHub Desktop.
Save esolitos/c4fa8500eb88bf33a76278849ad39775 to your computer and use it in GitHub Desktop.
Useful random bash stuff
#
# Drupal 8+: Get installed module versions based on info.yml files
for yml in $(find web/modules/contrib -maxdepth 2 -type f -name '*.info.yml'); do grep -Hi 'version:' "$yml"; done;
#
# Composer: Get all drupal modules in lock file with relative version
jq -c '.packages[] | ({(.name): .version})' < composer.lock | grep --color '"drupal/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment