File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # # #ddev-generated
4+ # # Description: Change the version of Drupal core.
5+ # # Usage: xb-core-set-version <core-version>
6+ # # Example: ddev core ^11 # Use the latest 11.x.\nddev core 11.0.7 # Use a specific version.\nddev core "^10 || ^11" # Use the latest 10.x or 11.x.
7+ # # Aliases: core
8+ # # Flags: []
9+ # # ExecRaw: true
10+
11+ cd " $DDEV_COMPOSER_ROOT " || exit 1
12+
13+ if [ " $# " -ne 1 ]; then
14+ echo " Error: provide exactly one argument"
15+ echo " Usage: core <core-version>"
16+ exit 1
17+ fi
18+
19+ CORE_VERSION=$1
20+
21+ composer require \
22+ --dev \
23+ --no-update \
24+ " drupal/core-dev:$CORE_VERSION "
25+ composer require \
26+ --no-update \
27+ " drupal/core-recommended:$CORE_VERSION " \
28+ " drupal/core-composer-scaffold:$CORE_VERSION " \
29+ " drupal/core-project-message:$CORE_VERSION "
30+ composer update --with-all-dependencies
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ project_files:
1010 - commands/host/xb-setup
1111 - commands/host/xb-static
1212 - commands/web/xb-autosave
13+ - commands/web/xb-core-set-version
1314 - commands/web/xb-eslint
1415 - commands/web/xb-phpcs
1516 - commands/web/xb-phpstan
You can’t perform that action at this time.
0 commit comments