Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[build] Updated the Apache release scripts. (#1741)
Browse files Browse the repository at this point in the history
Added 'npm run build:rax' to generate Rax precompiled js files, and
updated the build command and generated project for iOS.
  • Loading branch information
jondong authored and Hanks10100 committed Nov 13, 2018
1 parent bdd3fbd commit 3436364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 8 additions & 4 deletions scripts/build_from_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@

set -e
if [ ! -f scripts/build_from_source.sh ];then
echo "This script must execute in project root"
echo "This script must be executed from project root."
exit 1
fi

echo "Build Weex SDK From Source...."
echo "Build Weex SDK from source...."

npm install
npm run build:jsfm
npm run build:polyfill
npm run build:rax

echo "Weex JS Framework build completed."
sleep 2

mkdir pre-build
# Copy built JS resources to their destination.
[ -d pre-build ] || mkdir pre-build
cp dist/weex-js-framework.min.js pre-build/native-bundle-main.js
cp dist/weex-js-framework.min.js android_sdk/assets/native-bundle-main.js
cp dist/weex-js-framework.min.js pre-build/weex-main-jsfm.js
Expand All @@ -40,10 +42,12 @@ cp dist/weex-polyfill.min.js pre-build/weex-polyfill.js
cp dist/weex-rax.min.js pre-build/weex-rax-api.js
cp dist/weex-rax.min.js android_sdk/assets/weex-rax-api.js

# Build android_sdk
gradle wrapper --gradle-version 4.4
echo 'include ":android_sdk"'>settings.gradle
./gradlew :android_sdk:assemble -PasfRelease

xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL
# Build iOS sdk
xcodebuild -project ios_sdk/WeexSDK.xcodeproj -scheme WeexSDK_MTL

echo "Weex SDK Build completed."
5 changes: 3 additions & 2 deletions scripts/generate_apache_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ rm -rf $dest/android/sdk/src/test/java/com

mv $dest/ios/sdk $dest/ios_sdk
mv $dest/android/sdk $dest/android_sdk
$SED_CMD -i '' 's/\.\.\/\.\.\/weex_core/\.\.\/weex_core/g' $dest/android_sdk/build.gradle
$SED_CMD -i '' 's/\.\.\/\.\.\/weex_core/\.\.\/weex_core/g' $dest/android_sdk/build.gradle $dest/ios_sdk/WeexSDK.xcodeproj/project.pbxproj
$SED_CMD -i '' 's/\.\.\/\.\.\/pre-build/\.\.\/pre-build/g' $dest/android_sdk/build.gradle $dest/ios_sdk/WeexSDK.xcodeproj/project.pbxproj
[ -d "$dest/ios_sdk/build" ] && rm -rf "$dest/ios_sdk/build"
mv $dest/android/build.gradle $dest/build.gradle
rm -rf $dest/android $dest/ios

rm -rf $dest/android_sdk/gradle
rm -rf $dest/android_sdk/gradle

0 comments on commit 3436364

Please sign in to comment.