Skip to content
Snippets Groups Projects

Issue #3500131: Fix launcher script counter

2 unresolved threads
Closed Stas Zhuk requested to merge issue/drupal_cms-3500131:adjust-launch-script into 1.x
2 unresolved threads

Issue #3500131: launcher script appends -1 to every project created

Closes #3500131

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ralf Koller
  • Left two comments with suggestions. And I've manually tested and the proposed code fixes the two problems summarized in https://www.drupal.org/project/drupal_cms/issues/3500131#comment-15945128.

    Edited by Ralf Koller
  • Stas Zhuk added 1 commit

    added 1 commit

    Compare with previous version

  • Stas Zhuk added 1 commit

    added 1 commit

    Compare with previous version

  • Stas Zhuk resolved all threads

    resolved all threads

  • Stas Zhuk added 1 commit

    added 1 commit

    Compare with previous version

  • Stas Zhuk added 1 commit

    added 1 commit

    Compare with previous version

  • Stas Zhuk added 11 commits

    added 11 commits

    Compare with previous version

  • Stas Zhuk added 9 commits

    added 9 commits

    Compare with previous version

  • 17 # Check if DDEV is installed.
    18 if ! command -v ddev >/dev/null 2>&1; then
    16 19 echo "DDEV needs to be installed. Visit https://ddev.com/get-started for instructions."
    17 20 exit 1
    18 21 fi
    19 22
    20 NAME=$(basename $PWD)
    21 # If there are any other DDEV projects in this system with this name, add a numeric suffix.
    22 declare -i n=$(ddev list | grep --count "$NAME")
    23 if [ $n > 0 ]; then
    24 NAME=$NAME-$(expr $n + 1)
    23 # Check if DDEV meets the required version constraint.
    24 if ! ddev debug match-constraint 2>&1 | grep -q match-constraint || ! ddev debug match-constraint "$DDEV_VERSION_CONSTRAINT" >/dev/null 2>&1; then
    25 echo "Your DDEV version doesn't meet the constraint '$DDEV_VERSION_CONSTRAINT'. Please update to a DDEV version that meets this constraint."
    26 exit 1
    27 fi
  • 37 if ! ddev describe "$NAME" >/dev/null 2>&1; then
    38 break
    39 fi
    40 NAME="$ORIGINAL_NAME-$SUFFIX"
    41 done
    42 # Configure the new DDEV project.
    43 ddev config --project-type=drupal11 --docroot=web --php-version=8.3 --ddev-version-constraint="$DDEV_VERSION_CONSTRAINT" --project-name="$NAME"
    44 fi
    45
    46 CURRENT_DIR="$PWD"
    47 # Change directory to the project root.
    48 cd "$(DDEV_VERBOSE=false DDEV_DEBUG=false ddev debug cd "" --get-approot)"
    49
    50 if [ "$PWD" != "$CURRENT_DIR" ]; then
    51 echo "You're trying to set up a Drupal CMS inside an existing project in $PWD, refusing to do it."
    52 exit 1
  • closed

  • Please register or sign in to reply
    Loading