✨feature: Update bootstrap script
This commit is contained in:
@@ -90,8 +90,10 @@ else
|
|||||||
if wp user list --field=user_email | grep -q "^${ADMIN_EMAIL}\$"; then
|
if wp user list --field=user_email | grep -q "^${ADMIN_EMAIL}\$"; then
|
||||||
echo "Admin email ${ADMIN_EMAIL} already in use; skipping user create."
|
echo "Admin email ${ADMIN_EMAIL} already in use; skipping user create."
|
||||||
else
|
else
|
||||||
wp user create "$ADMIN_USER" "$ADMIN_EMAIL" --role=administrator --user_pass="$(openssl rand -base64 16)"
|
PASS=$(openssl rand -base64 16)
|
||||||
echo "Admin user $ADMIN_USER created with email $ADMIN_EMAIL (random password)."
|
|
||||||
|
wp user create "$ADMIN_USER" "$ADMIN_EMAIL" --role=administrator --user_pass="$PASS"
|
||||||
|
echo "Admin user $ADMIN_USER created with email $ADMIN_EMAIL ($PASS)."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -119,6 +121,12 @@ DEV_PLUGINS=(
|
|||||||
query-monitor
|
query-monitor
|
||||||
user-switching
|
user-switching
|
||||||
debug-bar
|
debug-bar
|
||||||
|
https://docs.vincentdevelopment.ca/files/advanced-custom-fields-pro.zip
|
||||||
|
https://docs.vincentdevelopment.ca/files/gravity-forms.zip
|
||||||
|
autodescription
|
||||||
|
better-search-replace
|
||||||
|
google-site-kit
|
||||||
|
simple-history
|
||||||
)
|
)
|
||||||
|
|
||||||
for PLUGIN in "${DEV_PLUGINS[@]}"; do
|
for PLUGIN in "${DEV_PLUGINS[@]}"; do
|
||||||
@@ -151,7 +159,7 @@ if [[ -n "$THEME_STARTER_REPO" ]]; then
|
|||||||
mkdir -p "$THEMES_DIR"
|
mkdir -p "$THEMES_DIR"
|
||||||
|
|
||||||
# Slug from project name
|
# Slug from project name
|
||||||
THEME_SLUG=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')
|
THEME_SLUG=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' | sed 's/-$//')
|
||||||
[[ -z "$THEME_SLUG" ]] && THEME_SLUG="custom-theme"
|
[[ -z "$THEME_SLUG" ]] && THEME_SLUG="custom-theme"
|
||||||
|
|
||||||
TARGET_THEME_DIR="${THEMES_DIR}/${THEME_SLUG}"
|
TARGET_THEME_DIR="${THEMES_DIR}/${THEME_SLUG}"
|
||||||
@@ -187,4 +195,15 @@ else
|
|||||||
echo "==> Theme starter repo not provided; skipping theme bootstrap."
|
echo "==> Theme starter repo not provided; skipping theme bootstrap."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "==> Installing dependencies..."
|
||||||
|
cd "$TARGET_THEME_DIR"
|
||||||
|
/usr/local/bin/composer install
|
||||||
|
/usr/bin/npm install
|
||||||
|
|
||||||
|
echo "==> Doing initial build..."
|
||||||
|
/usr/bin/npm run build
|
||||||
|
|
||||||
|
echo "==> Updating site permissions..."
|
||||||
|
sudo /usr/local/bin/wo-fix-perms.sh "$DOMAIN"
|
||||||
|
|
||||||
echo "==> Bootstrap complete."
|
echo "==> Bootstrap complete."
|
||||||
|
|||||||
Reference in New Issue
Block a user