sh Drupal构建更新脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Drupal构建更新脚本相关的知识,希望对你有一定的参考价值。

#!/bin/bash
echo "Executing build for upgrade"
echo ""

echo "Registry rebuild"
drush rr
echo ""

# You can run this script with the argument dev.
dev_setup=false
if [[ $# -eq 1 ]]; then
  if [[ $1 = "dev" ]]; then
    dev_setup=true
  fi
fi

if $dev_setup ; then
  echo "Build script for development"
  echo ""
  # Disable modules here.
fi

echo "Running any required database updates"
drush updb -y
echo ""

# Clear the cache.
echo "Clearing cache"
drush cc all
echo ""

# Revert features
echo "Reverting all features"
drush fra -y
echo ""

# Clear the cache.
echo "Clearing cache"
drush cc all

if $dev_setup ; then
  echo "Dev: create user admin"
  drush user-create prometadmin --mail="admin@webizat.com" --password="admin"
  echo "Dev: add role admin to admin"
  drush user-add-role "administrator" admin
else
  # Index the nodes in Solr (Uncomment next line when ready)
  # drush solr-index
fi

# Clear the cache
echo "Clearing cache one last time"
drush cc all
echo ""

echo ""
echo "Build completed"

if $dev_setup ; then
  echo "Dev: your connexion token as admin"
  drush uli admin
fi

以上是关于sh Drupal构建更新脚本的主要内容,如果未能解决你的问题,请参考以下文章

sh 适用于Linux Debian / Ubuntu的Drupal安装脚本

sh Drush在其自己的文件夹中更新Drupal Sites的目录

推荐系统实战——自动化构建用户以及物料画像

sh 清除Drupal缓存

sh 一线drupal安装程序

sh 应用Drupal补丁