aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2012-05-14 23:14:36 (GMT)
committerKoushik Dutta <koushd@gmail.com>2012-05-14 23:14:36 (GMT)
commitf24a18f74172bd178b30caa7527b424c986b7180 (patch)
treee9075b452f4cb3f000f91f51305745336927610e
parent94ca19659ccf023b01043a319e242df4bcd2e42c (diff)
downloadandroid_build-cm-9.0.0.zip
android_build-cm-9.0.0.tar.gz
android_build-cm-9.0.0.tar.bz2
makerecipe: WIP to generate manifest branches for releasescm-9.0.0
Change-Id: I1804c180844043692f788275c8998307e348001b
-rw-r--r--envsetup.sh31
1 files changed, 29 insertions, 2 deletions
diff --git a/envsetup.sh b/envsetup.sh
index bf20523..43c5941 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1169,8 +1169,12 @@ function cmremote()
GERRIT_REMOTE=$(cat .git/config | grep git://github.com | awk '{ print $NF }' | sed s#git://github.com/##g)
if [ -z "$GERRIT_REMOTE" ]
then
- echo Unable to set up the git remote, are you in the root of the repo?
- return 0
+ GERRIT_REMOTE=$(cat .git/config | grep http://github.com | awk '{ print $NF }' | sed s#http://github.com/##g)
+ if [ -z "$GERRIT_REMOTE" ]
+ then
+ echo Unable to set up the git remote, are you in the root of the repo?
+ return 0
+ fi
fi
CMUSER=`git config --get review.review.cyanogenmod.com.username`
if [ -z "$CMUSER" ]
@@ -1181,6 +1185,29 @@ function cmremote()
fi
echo You can now push to "cmremote".
}
+export -f cmremote
+
+function makerecipe() {
+ if [ -z "$1" ]
+ then
+ echo "No branch name provided."
+ return 1
+ fi
+ cd android
+ sed -i s/'default revision=.*'/'default revision="refs\/heads\/'$1'"'/ default.xml
+ git commit -a -m "$1"
+ cd ..
+
+ repo forall -c '
+
+ if [ "$REPO_REMOTE" == "github" ]
+ then
+ pwd
+ cmremote
+ git push cmremote HEAD:refs/heads/'$1'
+ fi
+ '
+}
function cmgerrit() {
if [ $# -eq 0 ]; then