release_notes.sh 1.41 KB
Newer Older
1 2 3 4 5 6 7 8
#!/bin/sh -e

#
# Print changes for all packaged modules.
# This expects local checkouts to be available.
#
# To be used in the release notes on https://github.com/aegir-project/documentation/blob/3.x/docs/release-notes/

helmo's avatar
helmo committed
9
modules="hostmaster provision hosting eldir hosting_civicrm hosting_git hosting_remote_import hosting_site_backup_manager hosting_tasks_extra hosting_logs hosting_https hosting_deploy aegir_objects"
10 11

if [ -z "$1" ]; then
12 13
  echo "Usage: $0 <previous release tag, e.g. 7.x-3.160>"
  echo "Best not to use the tags for minor releases, repositories that don't have this tag then fail to generate notes fails "
14 15 16 17
  exit 1
fi
prev_release=$1

18 19 20 21 22 23 24 25 26
CURRENT_BRANCH=7.x-3.x

TEMPDIR=`mktemp --directory`


echo "Cloning into temp dir $TEMPDIR..."
echo

cd $TEMPDIR
27 28

for shortname in $modules; do
29 30 31 32

  # Grab a fresh copy, to avoid projects being on feature branches and having local commits.
  git clone --quiet --branch $CURRENT_BRANCH git@git.drupal.org:project/$shortname.git >> $TEMPDIR/clone.log

33 34 35
  cd $shortname >> /dev/null;
  git pull --quiet
  echo "**Changes to $shortname since $prev_release**"
36 37 38 39 40 41 42 43 44 45 46
  changes=`drush rn --baseurl=https://www.drupal.org/ --md $prev_release HEAD | grep -v "Changes since $prev_release"`
  if [ -z "$changes" ]; then
    echo
    echo "* None"
  else
    echo "$changes"
  fi

  echo
  echo

47 48 49
  cd - >> /dev/null;
done

50
cd - >> /dev/null;
51 52

echo "Fresh clones left in temp dir $TEMPDIR for your conveniance."