Update SDK prebuilts: sdklib + sdkuilib.
Origin:
tools/base @ a7371bb93416bfa909f6099b306ebcda504fb550
tools/swt @ ebd5d7dcf1c14082e3e7599926f92e81a6b4ea9e
Change-Id: Id3b9b93da18fa58efce996bc2f6d90136915d8bf
diff --git a/manifmerger/manifmerger.jar b/manifmerger/manifmerger.jar
deleted file mode 100644
index a7cc599..0000000
--- a/manifmerger/manifmerger.jar
+++ /dev/null
Binary files differ
diff --git a/sdklib.jar b/sdklib.jar
index b8db74c..87d28c2 100644
--- a/sdklib.jar
+++ b/sdklib.jar
Binary files differ
diff --git a/sdkuilib.jar b/sdkuilib.jar
index 6be719b..250e35b 100644
--- a/sdkuilib.jar
+++ b/sdkuilib.jar
Binary files differ
diff --git a/update_jars.sh b/update_jars.sh
index b162308..6275100 100755
--- a/update_jars.sh
+++ b/update_jars.sh
@@ -1,17 +1,28 @@
#!/bin/bash
-set -e # fail on errors
-DRY="echo" # default to dry mode unless -f is specified
-FILTER="" # name of a specific jar to update (default: update them all)
+set -e # fail on errors
+
+PROG_DIR=$(readlink -f $(dirname "$0"))
+cd "$PROG_DIR"
+
+DRY="echo" # default to dry mode unless -f is specified
+FILTER="" # name of a specific jar to update (default: update them all)
+MK_MERGE_MSG="1" # 1 to update the MERGE_MSG, empty to do not generate it
+MERGE_MSG1="" # msg to generate
+MERGE_MSG2="" # msg to generate
while [[ -n "$1" ]]; do
if [[ "$1" == "-f" ]]; then
DRY=""
+ elif [[ "$1" == "-m" ]]; then
+ MK_MERGE_MSG=""
elif [[ $1 =~ ^[a-z]+ ]]; then
- FILTER="$FILTER $1 "
+ FILTER="$FILTER ${1/.jar/} "
else
echo "Unknown argument: $1"
- echo "Usage: $0 [project_to_update] [-f]"
+ echo "Usage: $0 [project_to_update] [-f] [-m]"
+ echo " -f: force actually generating/modifying files."
+ echo " -m: do NOT generate a .git/MERGE_MSG"
echo " (default: updates all jars.)"
exit 1
fi
@@ -104,6 +115,16 @@
local repo=$1
local buildlist=$(get_map BUILD_LIST $repo)
+ if [[ -n "$buildlist" ]]; then
+ local names=${buildlist//:/}
+ names=${names//prebuiltJar/}
+ MERGE_MSG1="$MERGE_MSG1
+tools/$repo: Changed $names"
+ local SHA1=$( cd ../../tools/$repo ; git show-ref --head --hash HEAD )
+ MERGE_MSG2="$MERGE_MSG2
+tools/$repo @ $SHA1"
+ fi
+
# To build tools/swt, we'll need to first locally publish some
# libs from tools/base.
if [[ "$repo" == "base" && -n $(get_map BUILD_LIST swt) ]]; then
@@ -147,12 +168,27 @@
fi
}
+function merge_msg() {
+ local dst=.git/MERGE_MSG
+ if [[ -n $DRY ]]; then
+ echo "The following would be output to $dst (use -m to prevent this):"
+ dst=/dev/stdout
+ fi
+ cat >> $dst <<EOMSG
+Update SDK prebuilts.
+$MERGE_MSG1
+
+Origin:$MERGE_MSG2
+EOMSG
+}
+
list_projects
for r in base swt; do
if build $r; then
copy_files $r
fi
done
+if [[ $MK_MERGE_MSG ]]; then merge_msg; fi
if [[ -n $DRY ]]; then
echo
echo "## WARNING: DRY MODE. Run with -f to actually copy files."