#!/bin/bash
cd `dirname $0`
set -e

APP="$1"
VERSION="$2"

if [ -z "$VERSION" ]; then
    echo "Usage: $0 APP VERSION"
    echo
    echo "For preparing a special test copy of an application with"
    echo "Any new configuration changes."
    echo
    echo "See docs/upgrade.rst <http://scripts.mit.edu/wizard/upgrade.html>"
    echo "for detailed usage instructions."
    exit 1
fi

env WIZARD_NO_COMMIT=1 ./$APP-install-test.sh $VERSION
cd testdir_${APP}_install_${VERSION}
wizard prepare-config
echo "Diff:"
git diff
