Repository: incubator-weex
Updated Branches:
  refs/heads/master aef835a25 -> e82a37236


[Release] Fixed the weex_core build path issue

As we shrink the path 'android/sdk' to 'android_sdk' when
generating release source package, the relative path dependency
in 'android/sdk/build.gradle' for weex_core has been broken. Fixed
this issue using sed.
Same thing happens to the path of 'pre-build', fixed the build.gradle
and XCode project file with sed, and added pre-build into the release
rules to make iOS build pass.
Also fixed the replacement issues with find command, and added iOS
replacement support as well.
Granted the execution rights to 'scripts/build_from_source.sh'.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e82a3723
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e82a3723
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e82a3723

Branch: refs/heads/master
Commit: e82a37236ce8eeffe49f1bbacc20cbeec70bcd43
Parents: aef835a
Author: Jonathan Dong <jondong.commun...@outlook.com>
Authored: Tue Jun 26 14:43:50 2018 +0800
Committer: Jonathan Dong <jondong.commun...@outlook.com>
Committed: Tue Jun 26 16:52:16 2018 +0800

----------------------------------------------------------------------
 scripts/build_from_source.sh       |  0
 scripts/generate_apache_release.sh | 16 +++++++---------
 scripts/release_files.rules        |  2 ++
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e82a3723/scripts/build_from_source.sh
----------------------------------------------------------------------
diff --git a/scripts/build_from_source.sh b/scripts/build_from_source.sh
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e82a3723/scripts/generate_apache_release.sh
----------------------------------------------------------------------
diff --git a/scripts/generate_apache_release.sh 
b/scripts/generate_apache_release.sh
index 61d6531..99c82f3 100755
--- a/scripts/generate_apache_release.sh
+++ b/scripts/generate_apache_release.sh
@@ -1,6 +1,6 @@
 #!/bin/bash -eu
 set -e
-if [ ! -f scripts/build_from_source.sh ];then
+if [ ! -f scripts/build_from_source.sh ]; then
     echo "This script must execute in project root"
     exit 1
 fi
@@ -9,11 +9,11 @@ dest='apache_release_temp'
 
 rm -rf $dest
 mkdir $dest
-rsync -rvv  --include-from=scripts/release_files.rules ./ $dest
+rsync -r --include-from=scripts/release_files.rules ./ $dest
 
 #repackage
-find $dest/android/sdk/src -type f -name '*.java' -exec sed -i '' 
's/com\.taobao\.weex/org\.apache\.weex/g' {} \;
-find $dest/android/sdk/src -type f -name 'AndroidManifest.xml' -exec sed -i '' 
's/com\.taobao\.weex/org\.apache\.weex/g' {} \;
+find $dest/android/sdk -type f \( -name '*.java' -o -name 
'AndroidManifest.xml' -o -name 'proguard-rules.pro' \) -exec sed -i 
's/com\.taobao\.weex/org\.apache\.weex/g' {} \;
+find $dest/ios/sdk -type f \( -name 'project.pbxproj' -o -name '*.h' -o -name 
'*.m' -o -name '*.mm' \) -exec sed -i 's/com\.taobao\.weex/org\.apache\.weex/g' 
{} \;
 
 mkdir -p $dest/android/sdk/src/main/java/org
 mkdir -p $dest/android/sdk/src/main/java/org/apache
@@ -25,12 +25,10 @@ mkdir -p $dest/android/sdk/src/test/java/org/apache
 mv $dest/android/sdk/src/test/java/com/taobao 
$dest/android/sdk/src/test/java/org/apache
 rm -rf $dest/android/sdk/src/test/java/com
 
-#sed -i '' 's/com\/taobao\/weex/org\/apache\/weex/g' 
$dest/android/sdk/build.gradle
-
 mv $dest/ios/sdk $dest/ios_sdk
-rm -rf $dest/ios
-
 mv $dest/android/sdk $dest/android_sdk
+sed -i 's/\.\.\/\.\.\/weex_core/\.\.\/weex_core/g' 
$dest/android_sdk/build.gradle
+sed -i 's/\.\.\/\.\.\/pre-build/\.\.\/pre-build/g' 
$dest/android_sdk/build.gradle $dest/ios_sdk/WeexSDK.xcodeproj/project.pbxproj
 mv $dest/android/build.gradle $dest/build.gradle
-rm -rf $dest/android
+rm -rf $dest/android $dest/ios
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e82a3723/scripts/release_files.rules
----------------------------------------------------------------------
diff --git a/scripts/release_files.rules b/scripts/release_files.rules
index 4d1831c..92dc3ac 100644
--- a/scripts/release_files.rules
+++ b/scripts/release_files.rules
@@ -41,6 +41,8 @@
 + /packages
 + /build
 + /build/**
++ /pre-build
++ /pre-build/**
 
 ###### weexcore ######
 + /weex_core

Reply via email to