9 if [ -z "$APPLICATION" ]; then
10 echo "$0 APP VERSION PRIOR-VERSION APPLICATION"
12 echo "Prepares a retroactive upgrade on a repository. Be"
13 echo "sure to run tests/prepare-upgrade.sh on the resulting"
14 echo "commits on a scripts server."
16 echo " APP : short name, like 'wordpress'"
17 echo " VERSION : version being retro'd"
18 echo " PRIOR-VERSION : version to retro on to"
19 echo " APPLICATION : full name of application for commit message"
21 echo "See docs/upgrade.rst <http://scripts.mit.edu/wizard/upgrade.html>"
22 echo "for detailed instructions."
26 git checkout -b tmaster || git checkout tmaster
27 git reset --hard $APP-$PRIOR-scripts
28 git checkout -b tpristine || git checkout tpristine
29 git reset --hard $APP-$PRIOR
31 DATE=`git show HEAD --format="format:%cd" | head -n1`
33 export GIT_AUTHOR_DATE="$DATE"
34 export GIT_COMMITTER_DATE="$DATE"
36 wizard prepare-pristine $APP-$VERSION --force
37 git commit -asm "$APPLICATION $VERSION"
41 git merge tpristine --no-commit || bash || true
42 git commit -asm "$APPLICATION $VERSION-scripts"
43 git tag $APP-$VERSION-scripts