Last active
December 22, 2015 00:58
-
-
Save brendandahl/6392652 to your computer and use it in GitHub Desktop.
Create mozilla-<beta/aurora> uplift patch for pdf.js.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: $0 1_NAME 2_MESSAGE 3_BASELINE 4_CHERRY-PICK" >&2 | |
echo "Example: $0 annot-ap-beta \"Bug 890259 - Use text widget annotation appearance stream if it is available.\" 4e83123 feafb39" >&2 | |
echo "Run in your mozilla-<branch> directory." >&2 | |
exit 1 | |
fi | |
read -p "Did you 1) pop all hg patches, 2) update mozilla-<version>, 3) make sure pdf.js is clean?[y\n] " -n 1 | |
if [[ ! $REPLY =~ ^[Yy]$ ]] | |
then | |
exit 1 | |
fi | |
pushd . | |
cd ~/projects/mine/pdf.js | |
git checkout $3 | |
git cherry-pick $4 | |
BASELINE=$3 node make mozcentralbaseline | |
node make mozcentraldiff | |
popd | |
hg qimport -n $1 ~/projects/mine/pdf.js/build/mozcentral.diff | |
hg qpush | |
hg qref -m "$2" -X "*" | |
echo "REMEBER to wipe out commit id changes..." | |
echo "Then:" | |
echo "hg qref && hg export qtip > ~/projects/mozilla-central/patches~/$1.patch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage:
uplift.sh annot-ap-beta "Bug 890259 - Use text widget annotation appearance stream if it is available." 4e83123 feafb39