2010-08-18 17:47:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Gerrit tool for easiness of submitting changes to CM repos
|
|
|
|
# Wes Garner
|
2010-08-18 20:04:53 +00:00
|
|
|
# Usage: cmgerrit <CM Gerrit username> <repo> <for/changes> <branch/change-id>
|
|
|
|
# Note: for = new submissions, changes = new patch set for current submission
|
2010-08-18 17:47:27 +00:00
|
|
|
#
|
|
|
|
|
2010-08-18 20:04:53 +00:00
|
|
|
user=$1
|
|
|
|
repo=$2
|
|
|
|
mode=$3
|
|
|
|
target=$4
|
|
|
|
|
|
|
|
if [ -z $user ]
|
|
|
|
then
|
|
|
|
echo "Type your CyanogenMod Gerrit username: "
|
|
|
|
read user
|
|
|
|
echo "What is the repository you are submitting to? (ex. android_vendor_cyanogen) "
|
|
|
|
read repo
|
|
|
|
echo "Is this a new change or a new patchset to a current change? (for = new, changes = patch set) "
|
|
|
|
read mode
|
|
|
|
echo "What is the branch (for a new change) OR change-id (for a current change) you are working with? "
|
|
|
|
read target
|
|
|
|
fi
|
|
|
|
|
|
|
|
git push ssh://$user@review.cyanogenmod.com:29418/CyanogenMod/$repo HEAD:refs/$mode/$target
|
|
|
|
|