#!/bin/sh
# Script to generate release notes for the WxT installation profile
# This command expects to be run within the WxT profile.
# To use this command you must have Git Release Notes for Drush installed
# @see https://drupal.org/project/grn
if [ $# -ne 2 ]; then
echo "Usage $0 previous_tag latest_tag"
exit 1
fi
BASE_PATH=`pwd`
# Create a directory to store all the release notes
mkdir $BASE_PATH/release_notes/
echo "creating release notes for wxt"
echo "
Instructions on how to upgrade:
" > $BASE_PATH/release_notes/wxt.html
echo "" >> $BASE_PATH/release_notes/wxt.html
echo "- Download the latest packaged version of WxT from Drupal.org. This will include updated versions of all of WxT's bundled modules, themes, and libraries.
" >> $BASE_PATH/release_notes/wxt.html
echo "- Upgrade your existing site to use the code you just downloaded. Check out these instructions for more information: http://drupal.org/node/1223018
" >> $BASE_PATH/release_notes/wxt.html
echo "- Backup your database and run update.php *TWICE* on your site. This may perform several database updates for WxT and its bundled apps and modules.
" >> $BASE_PATH/release_notes/wxt.html
echo "- Navigate to the admin screen for Features (admin/structure/features) and revert any overridden features (unless you have intentionally made overrides you want to keep).
" >> $BASE_PATH/release_notes/wxt.html
echo "
" >> $BASE_PATH/release_notes/wxt.html
echo "Updates in this release:" >> $BASE_PATH/release_notes/wxt.html
# Create the release notes for the distro
drush rn $1 $2 >> $BASE_PATH/release_notes/wxt.html
# For each module, create some html release notes.
for MODULE in wetkit_admin wetkit_bean wetkit_breadcrumbs wetkit_core wetkit_demo wetkit_deployment wetkit_images wetkit_language wetkit_layouts wetkit_menu wetkit_metatag wetkit_migrate wetkit_og wetkit_pages wetkit_search wetkit_theme wetkit_users wetkit_webform wetkit_wetboew wetkit_widgets wetkit_wysiwyg
do
MODULENAME=`echo ${MODULE//_/ }`
echo "creating release notes for $MODULENAME"
cd modules/custom/$MODULE
drush rn $1 $2 > $BASE_PATH/release_notes/$MODULE.html
echo "$MODULENAME
" >> $BASE_PATH/release_notes/wxt.html
drush rn $1 $2 >> $BASE_PATH/release_notes/wxt.html
cd $BASE_PATH
done