Last active
August 29, 2015 14:11
-
-
Save rickychien/86c7175e47ece1a76696 to your computer and use it in GitHub Desktop.
Push to mozilla try server (Usage: ./push-to-try.sh branch-name)
This file contains 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/bash | |
# setup your mozilla-central REPO and github REMOTE. | |
# path to mozilla-central | |
REPO="mozilla-central" | |
# regualr expression for gaia github repo url | |
REMOTE="https:\/\/github\.com\/RickyChien\/gaia" | |
# try chooser syntax: http://trychooser.pub.build.mozilla.org | |
TRY_CMD="try: -b do -p emulator,emulator-jb,emulator-kk,linux32_gecko,linux64_gecko,macosx64_gecko,win32_gecko -u all -t none" | |
GAIA_JSON="b2g/config/gaia.json" | |
BRANCH=$1 | |
if [ -z "$BRANCH" ]; then | |
echo "Usage: $0 branch-name"; | |
exit 1; | |
fi | |
cd $REPO | |
hg qpop && hg qremove try.patch | |
hg pull && hg update && hg update --clean | |
sed -i -e "s/\"remote\": \".*\"/\"remote\": \"$REMOTE\"/g" "$GAIA_JSON" | |
sed -i -e "s/\"branch\": \".*\"/\"branch\": \"$BRANCH\"/g" "$GAIA_JSON" | |
hg qqueue -c && hg qqueue --active && hg qnew try.patch && hg qref -m "$TRY_CMD" && hg push -f try && hg qpop && hg qremove try.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment