Skip to content

Commit

Permalink
make release can release the modified java files from miui
Browse files Browse the repository at this point in the history
Change-Id: I1bbf8bba6fd643b1eaee2d05ff03e9ac543b96f4
  • Loading branch information
fanoge committed Jan 19, 2012
1 parent 5e769db commit 4a040f0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
11 changes: 8 additions & 3 deletions envsetup.sh
Expand Up @@ -9,15 +9,17 @@
# android_build_top and android_product_out specified here would not be used.
# If android_build_top or android_product_out is empty, then ?

set -- `getopt "a:l:h" "$@"`
set -- `getopt "a:l:b:h" "$@"`
android_top=
android_lunch=
ANDROID_BRANCH=
help=
while :
do
case "$1" in
-a) shift; android_top="$1" ;;
-l) shift; android_lunch="$1";;
-b) shift; ANDROID_BRANCH="$1";;
-h) help=1;;
--) break ;;
esac
Expand All @@ -26,7 +28,7 @@ done
shift

if [ -n "$help" ]; then
echo "Usage: . /path/to/envsetup [-a android-top [-l lunch-option]]"
echo "Usage: . /path/to/envsetup [-a android-top [-l lunch-option] [-b android-branch]]"
return
fi

Expand All @@ -42,6 +44,8 @@ if [ -n "$android_top" ]; then
USE_ANDROID_OUT=true
export USE_ANDROID_OUT
cd $PORT_ROOT
else
ANDROID_BRANCH=
fi

TOPFILE=build/porting.mk
Expand All @@ -64,10 +68,11 @@ if [ -n "$PORT_ROOT" ]; then
PORT_BUILD=$PORT_ROOT/build
ANDROID_TOP=${ANDROID_BUILD_TOP:=$1}
ANDROID_OUT=${ANDROID_PRODUCT_OUT:=$2}
export PORT_ROOT PORT_BUILD ANDROID_TOP ANDROID_OUT
export PORT_ROOT PORT_BUILD ANDROID_TOP ANDROID_OUT ANDROID_BRANCH
echo "PORT_ROOT = $PORT_ROOT"
echo "ANDROID_TOP = $ANDROID_TOP"
echo "ANDROID_OUT = $ANDROID_OUT"
echo "USE_ANDROID_OUT = $USE_ANDROID_OUT"
echo "ANDROID_BRANCH = $ANDROID_BRANCH"
fi

14 changes: 13 additions & 1 deletion util.mk
Expand Up @@ -23,7 +23,19 @@ apktool-if: $(SYSOUT_DIR)/framework/framework.jar $(TMP_DIR)/framework-res.apk
$(APKTOOL) if $(TMP_DIR)/system/framework/twframework-res.apk

# Target to release MIUI jar and apks
release: $(RELEASE_MIUI)
release: $(RELEASE_MIUI) release-framework-base-src

ifeq ($(strip $(ANDROID_BRANCH)),)
release-framework-base-src:
$(error To release source code for framework base, run envsetup -b to specify branch)
else
release-framework-base-src:
@echo "To release source code for framework base..."
$(TOOL_DIR)/release_source.sh $(PORT_ROOT)/android/$(ANDROID_BRANCH) $(ANDROID_TOP) $(RELEASE_PATH)
mkdir -p $(RELEASE_PATH)/frameworks/miui
cp -r $(ANDROID_TOP)/frameworks/miui/overlay $(RELEASE_PATH)/frameworks/miui
endif


# Target to sign apks in the connected phone
sign: $(SIGNAPKS)
Expand Down

0 comments on commit 4a040f0

Please sign in to comment.