Wes Garner | 30f4635 | 2010-08-18 12:47:27 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Gerrit tool for easiness of submitting changes to CM repos |
| 4 | # Wes Garner |
Wes Garner | 75c82dd | 2010-08-18 15:04:53 -0500 | [diff] [blame^] | 5 | # Usage: cmgerrit <CM Gerrit username> <repo> <for/changes> <branch/change-id> |
| 6 | # Note: for = new submissions, changes = new patch set for current submission |
Wes Garner | 30f4635 | 2010-08-18 12:47:27 -0500 | [diff] [blame] | 7 | # |
| 8 | |
Wes Garner | 75c82dd | 2010-08-18 15:04:53 -0500 | [diff] [blame^] | 9 | user=$1 |
| 10 | repo=$2 |
| 11 | mode=$3 |
| 12 | target=$4 |
| 13 | |
| 14 | if [ -z $user ] |
| 15 | then |
| 16 | echo "Type your CyanogenMod Gerrit username: " |
| 17 | read user |
| 18 | echo "What is the repository you are submitting to? (ex. android_vendor_cyanogen) " |
| 19 | read repo |
| 20 | echo "Is this a new change or a new patchset to a current change? (for = new, changes = patch set) " |
| 21 | read mode |
| 22 | echo "What is the branch (for a new change) OR change-id (for a current change) you are working with? " |
| 23 | read target |
| 24 | fi |
| 25 | |
| 26 | git push ssh://$user@review.cyanogenmod.com:29418/CyanogenMod/$repo HEAD:refs/$mode/$target |
| 27 | |