Skip to content

Commit

Permalink
fix: improve fallback setup
Browse files Browse the repository at this point in the history
  • Loading branch information
shaal committed Apr 22, 2024
1 parent e58c519 commit 2150298
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -eu -o pipefail

# Check if additional modules should be installed
export DEVEL_NAME="devel"
Expand Down
12 changes: 8 additions & 4 deletions .gitpod/drupal/drupalpod-setup/drupalpod-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ convert_version() {
# echo $(convert_version "11.0-dev") # Output: 11.x

# Skip setup if it already ran once and if no special setup is set by DrupalPod extension
if [ ! -f "${GITPOD_REPO_ROOT}"/.drupalpod_initiated ] && [ -n "$DP_PROJECT_TYPE" ]; then
source "$DIR/git_setup.sh"
if [ ! -f "${GITPOD_REPO_ROOT}"/.drupalpod_initiated ]; then

# Set a default setup if project type wasn't specified
if [ -z "$DP_PROJECT_TYPE" ]; then
source "$DIR/fallback_setup.sh"
fi

source "$DIR/git_setup.sh"

# If this is an issue fork of Drupal core - set the drupal core version based on that issue fork
if [ "$DP_PROJECT_TYPE" == "project_core" ] && [ -n "$DP_ISSUE_FORK" ]; then
Expand All @@ -60,8 +65,7 @@ if [ ! -f "${GITPOD_REPO_ROOT}"/.drupalpod_initiated ] && [ -n "$DP_PROJECT_TYPE
# Measure the time it takes to go through the script
script_start_time=$(date +%s)

source "$DIR/fallback_setup.sh"
source "$DIR/install_modules.sh"
source "$DIR/contrib_modules_setup.sh"
source "$DIR/cleanup.sh"
source "$DIR/composer_setup.sh"

Expand Down
17 changes: 8 additions & 9 deletions .gitpod/drupal/drupalpod-setup/fallback_setup.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
set -eu -o pipefail

# Set a default setup if project type wasn't specified
if [ -z "$DP_PROJECT_TYPE" ]; then
export DP_INSTALL_PROFILE='demo_umami'
export DP_PROJECT_TYPE='project_core'
export DP_PROJECT_NAME="drupal"
export DP_CORE_VERSION='10.2.5'
export DP_EXTRA_DEVEL=1
export DP_EXTRA_ADMIN_TOOLBAR=1
fi
# Set a default setup (when project type is not specified)
export DP_INSTALL_PROFILE='demo_umami'
export DP_PROJECT_TYPE='project_core'
export DP_PROJECT_NAME="drupal"
export DP_CORE_VERSION='10.2.5'
export DP_EXTRA_DEVEL=1
export DP_EXTRA_ADMIN_TOOLBAR=1

0 comments on commit 2150298

Please sign in to comment.