summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2012-05-14 16:14:36 -0700
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 16:11:57 -0700
commitb55f13a625f6341bc515cde0215d4b2df1477b24 (patch)
treef7cf520e058a3b38fc748cf262c5335147d57adb /envsetup.sh
parentf80665d7f3f0dfbb02eeb90e7bd7b54ae77ededf (diff)
downloadbuild-b55f13a625f6341bc515cde0215d4b2df1477b24.zip
build-b55f13a625f6341bc515cde0215d4b2df1477b24.tar.gz
build-b55f13a625f6341bc515cde0215d4b2df1477b24.tar.bz2
makerecipe: WIP to generate manifest branches for releases
Change-Id: I1804c180844043692f788275c8998307e348001b
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh31
1 files changed, 29 insertions, 2 deletions
diff --git a/envsetup.sh b/envsetup.sh
index d20d874..23d4bcf 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1533,8 +1533,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" ]
@@ -1545,6 +1549,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