You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/05/24 08:10:02 UTC
incubator-weex git commit: * [all] changes for release
Repository: incubator-weex
Updated Branches:
refs/heads/dev 22116303a -> 7701f178b
* [all] changes for release
* move android & ios SDK to top level in source release, issue by IPMC
* add a script to generate source release files
* move scripts under bin/ to scripts/
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7701f178
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7701f178
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7701f178
Branch: refs/heads/dev
Commit: 7701f178b174f90ab4d483528cba3228dea6f987
Parents: 2211630
Author: sospartan <so...@apache.org>
Authored: Wed May 24 16:02:15 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed May 24 16:09:45 2017 +0800
----------------------------------------------------------------------
.flowconfig | 1 +
.gitignore | 3 ++
README_RELEASE.md | 25 ++++++++------
bin/commit-msg.sh | 28 ---------------
bin/dist-browser.sh | 60 ---------------------------------
bin/dist-js-framework.sh | 56 ------------------------------
bin/dist-vue.sh | 58 -------------------------------
bin/install-hooks.sh | 23 -------------
bin/pre-commit.sh | 27 ---------------
bin/pre-push.sh | 28 ---------------
bin/release.sh | 20 -----------
bin/welcome.sh | 27 ---------------
package.json | 6 ++--
scripts/build_from_source.sh | 14 ++++----
scripts/commit-msg.sh | 28 +++++++++++++++
scripts/dist-browser.sh | 60 +++++++++++++++++++++++++++++++++
scripts/dist-js-framework.sh | 56 ++++++++++++++++++++++++++++++
scripts/dist-vue.sh | 58 +++++++++++++++++++++++++++++++
scripts/generate_apache_release.sh | 19 +++++++++++
scripts/install-hooks.sh | 23 +++++++++++++
scripts/pre-commit.sh | 27 +++++++++++++++
scripts/pre-push.sh | 28 +++++++++++++++
scripts/release.sh | 20 +++++++++++
scripts/release_files.rules | 7 ++--
scripts/welcome.sh | 27 +++++++++++++++
25 files changed, 379 insertions(+), 350 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/.flowconfig
----------------------------------------------------------------------
diff --git a/.flowconfig b/.flowconfig
index 0dd9cea..d92b990 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -7,6 +7,7 @@
.*/android/.*
.*/ios/.*
.*/bin/.*
+.*/scripts/.*
.*/dist/.*
.*/flow-typed/.*
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index c5a3be7..23b8feb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,6 @@ doc/db.json
doc/node_modules/
doc/public/
doc/.deploy*/
+
+# release
+apache_release_temp
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/README_RELEASE.md
----------------------------------------------------------------------
diff --git a/README_RELEASE.md b/README_RELEASE.md
index 4f78c43..b46abbc 100644
--- a/README_RELEASE.md
+++ b/README_RELEASE.md
@@ -2,10 +2,16 @@
Weex produce SDKs to integrate to iOS/Android/Mobile web applications. This file will cover how to build Weex from source. You can either use the script we provided or manually build from source step by step.
See `README.md` for further information about Weex Framework.
+## Build Environment
+The environment required to build weex as follow:
+* NodeJs 4.0+
+* Gradle 2.0+
+* XCode & Command Tools 8.0+
+
## Build with Script
Run build script:
-> `$ bash script/build_from_source.sh`
+> `$ bash scripts/build_from_source.sh`
This's may take a while. After that, you can look into `dist/`, `android/sdk/build/output/` and `ios/sdk/Products` for Web/Android/iOS SDK artifacts.
@@ -31,29 +37,28 @@ The artifacts are under `dist/`.
### Before build Native SDK
Move `min` version to Native SDK folder, which will be used by native SDK build.
-> `cp dist/native.min.js ios/sdk/WeexSDK/Resources/main.js`
-> `cp dist/native.min.js android/sdk/assets/main.js`
+> `cp dist/native.min.js ios_sdk/WeexSDK/Resources/main.js`
+> `cp dist/native.min.js android_sdk/assets/main.js`
### Build Android SDK
Make sure you have install gradle, see more details about 'how to install gradle' in [gradle website](https://gradle.org/install).
-Go into the `android` folder then execute
-> `$ cd android `
+execute root folder of project
> `$ gradle wrapper --gradle-version 2.14.1`
Create a Gradle setting file
-> `$ echo 'include ":sdk"'>settings.gradle`
+> `$ echo 'include ":android_sdk"'>settings.gradle`
Build the SDK
-> `$ ./gradlew :sdk:assemble -PasfRelease`
+> `$ ./gradlew :android_sdk:assemble -PasfRelease`
-Now, you can see the artifacts under `android/sdk/build/output/`.
+Now, you can see the artifacts under `android_sdk/build/output/`.
You can now import the aar file to your android project.
### Build iOS SDK
Execute command below to compile iOS SDK:
-> `$ xcodebuild -project ios/sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
+> `$ xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
-Then you'll found iOS library(Framework file) under `ios/sdk/Products`.
+Then you'll found iOS library(Framework file) under `ios_sdk/Products`.
## Run Apache-Rat
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/commit-msg.sh
----------------------------------------------------------------------
diff --git a/bin/commit-msg.sh b/bin/commit-msg.sh
deleted file mode 100755
index 64381a9..0000000
--- a/bin/commit-msg.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Validate commit log
-commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] .{1,50}'
-
-if ! grep -iqE "$commit_regex" "$1"; then
- echo "ERROR: commit log format is not correct!"
- echo "See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#commit-log"
- exit 1
-fi
-# FIXME no effect after editor (like vim) exits
-# ISSUE merge or conflict
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/dist-browser.sh
----------------------------------------------------------------------
diff --git a/bin/dist-browser.sh b/bin/dist-browser.sh
deleted file mode 100755
index 2ad1f84..0000000
--- a/bin/dist-browser.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/user/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-echo ''
-echo ''
-echo 'packing weex-html5 for distribution...'
-
-src_dir=./html5
-base_dir=./packages/weex-html5
-dist_dir=${base_dir}/dist
-
-# get version of weex-html5 from subversion of main package.json.
-pkg=./package.json
-dist_pkg=${base_dir}/package.json
-version=$( grep -o -E "\"browser\": \"([0-9.]+)\"" ${pkg} | grep -o -E "[0-9.]+" )
-transformerVersion=$( grep -o -E "\"transformer\": \"([>=< 0-9.]+)\"" ${pkg} | grep -o -E "[>=< 0-9.]+")
-echo "version:" ${version}
-echo "availableTransfomer version:" ${transformerVersion}
-
-# update package.json for weex-html5 package.
-cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g" > ${base_dir}/tmp.json
-# cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g;s/\"transformer\": \"[>=< 0-9.]*\"/\"transformer\": \"${transformerVersion}\"/g" > ${base_dir}/tmp.json
-rm ${dist_pkg}
-mv ${base_dir}/tmp.json ${dist_pkg}
-
-# prepare dist directory to put weex files.
-if [ -e $dist_dir ]
- then rm -rf $dist_dir
-fi
-
-mkdir $dist_dir
-
-cp ./dist/browser.js ${dist_dir}/weex.js
-cp ./dist/browser.common.js ${dist_dir}/weex.common.js
-# cp ${dist_dir}/weex.js ${dist_dir}/weex.common.js
-echo -e "\nmodule.exports = global.weex;" >> ${dist_dir}/weex.common.js
-
-uglifyjs ${dist_dir}/weex.js -o ${dist_dir}/weex.min.js
-
-# rm -rf ${base_dir}/src
-# cp -fR ${src_dir} ${base_dir}/src
-
-echo 'packing finished.'
-echo ''
-echo ''
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/dist-js-framework.sh
----------------------------------------------------------------------
diff --git a/bin/dist-js-framework.sh b/bin/dist-js-framework.sh
deleted file mode 100755
index f814186..0000000
--- a/bin/dist-js-framework.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-echo 'packing weex-js-framework'
-
-config=./html5/runtime/config.js
-
-if ! [ -e $config ]; then
- echo "build JS Framework config"
- npm run build:config
-fi
-
-cd dist/weex-js-framework
-
-rm -Rf src
-mkdir src
-cp ../../.babelrc .
-cp -Rf ../../html5/* src/
-rm -Rf src/render/browser
-rm -Rf src/test
-
-if [ $# -gt 0 ]; then
- if ! [ -e .git ]; then
- echo "init git first"
- git init
- fi
- echo "version specified! $1"
- npm version $1
- rm -Rf .git
- version=$( grep -o -E "\"version\": \"([0-9.]+)\"" package.json | grep -o -E "[0-9.]+" )
- sed -i .tmp "s/\"framework\": \"[0-9.]*\"/\"framework\": \"${version}\"/g" package.json
- rm package.json.tmp
- sed -i .tmp "s/\"framework\": \"[0-9.]*\"/\"framework\": \"${version}\"/g" ../../package.json
- rm ../../package.json.tmp
-else
- echo "please pass a <version> or patch | minor | major"
-fi
-
-cd ../../
-
-echo 'packing finished.'
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/dist-vue.sh
----------------------------------------------------------------------
diff --git a/bin/dist-vue.sh b/bin/dist-vue.sh
deleted file mode 100644
index 60fce06..0000000
--- a/bin/dist-vue.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/user/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-echo ''
-# echo ' => cping files for vue dist...'
-
-base_dir=./packages/weex-vue-render
-src_dir=./html5
-vue_dir=${src_dir}/render/vue
-
-# browser_dir=${src_dir}/render/browser
-# shared_dir=${src_dir}/shared
-
-# dist_dir=./packages/weex-vue-render/src
-
-# rm -rf ${dist_dir}
-
-# mkdir $dist_dir
-# mkdir $dist_dir/render
-
-# cp -fR ${browser_dir} ${dist_dir}/render/
-# cp -fR ${vue_dir} ${dist_dir}/render/
-# cp -fR ${shared_dir} ${dist_dir}/
-
-echo " => cp READEME.md to dist path..."
-
-cp -f ${vue_dir}/README.md ${base_dir}/
-
-echo " => writing version number into weex-vue-render's package.json..."
-
-# get version of weex-html5 from subversion of main package.json.
-pkg=./package.json
-dist_pkg=${base_dir}/package.json
-version=$( grep -o -E "\"vue-render\": \"([0-9.]+)\"" ${pkg} | grep -o -E "[0-9.]+" )
-echo " => version:" ${version}
-
-# update package.json for weex-html5 package.
-cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g" > ${base_dir}/tmp.json
-# cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g;s/\"transformer\": \"[>=< 0-9.]*\"/\"transformer\": \"${transformerVersion}\"/g" > ${base_dir}/tmp.json
-rm ${dist_pkg}
-mv ${base_dir}/tmp.json ${dist_pkg}
-
-echo ' => writing finished.'
-echo ''
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/install-hooks.sh
----------------------------------------------------------------------
diff --git a/bin/install-hooks.sh b/bin/install-hooks.sh
deleted file mode 100755
index 49736dd..0000000
--- a/bin/install-hooks.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-if test -e .git/hooks; then
- ln -sf ../../bin/pre-commit.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
- ln -sf ../../bin/commit-msg.sh .git/hooks/commit-msg && chmod +x .git/hooks/commit-msg
- ln -sf ../../bin/pre-push.sh .git/hooks/pre-push && chmod +x .git/hooks/pre-push
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/pre-commit.sh
----------------------------------------------------------------------
diff --git a/bin/pre-commit.sh b/bin/pre-commit.sh
deleted file mode 100755
index 8723e25..0000000
--- a/bin/pre-commit.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-sh ./bin/welcome.sh
-
-# Validate email
-email=$(git config user.email | grep -E 'alibaba-inc.com|taobao.com|tmall.com|1688.com')
-if [ "$email" != "" ];then
- echo "ERROR: Your git repo email is '$email'. Please run:\n"
- echo " git config user.email 'your.github@binded.email'\n"
- exit 1
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/pre-push.sh
----------------------------------------------------------------------
diff --git a/bin/pre-push.sh b/bin/pre-push.sh
deleted file mode 100755
index d8dc4c1..0000000
--- a/bin/pre-push.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Validate branch name
-branch_regex="^(\d+\.\d+\.\d+)|(master|dev|android|ios|jsfm|html5|component|doc|website|example|test|all)(-(bugfix|feature|hotfix)-.+)?$"
-branch_name=$(git rev-parse --abbrev-ref HEAD)
-
-if ! (echo $branch_name | grep -iqE "$branch_regex"); then
- echo "ERROR: current branch is \"$branch_name\", name format is not correct!
-
-See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-name\n"
- exit 1
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/release.sh
----------------------------------------------------------------------
diff --git a/bin/release.sh b/bin/release.sh
deleted file mode 100644
index 003e0a4..0000000
--- a/bin/release.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-# Export bugfix log
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\].*(fix|bug|close)" > commit-history.log
-
-# git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\]" > commit-history.log
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/bin/welcome.sh
----------------------------------------------------------------------
diff --git a/bin/welcome.sh b/bin/welcome.sh
deleted file mode 100644
index 03c980f..0000000
--- a/bin/welcome.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-if ! test -e ./bin/.welcome; then
- touch ./bin/.welcome
- echo '********************************************************************************'
- echo '* *'
- echo '* Thanks for contributing Weex! *'
- echo '* See https://github.com/alibaba/weex/blob/master/CONTRIBUTING.md *'
- echo '* *'
- echo '********************************************************************************\n'
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index fc3f32f..03411bf 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"node": ">=4"
},
"scripts": {
- "postinstall": "bash ./bin/install-hooks.sh",
+ "postinstall": "bash ./scripts/install-hooks.sh",
"build:native": "node build/build.js native",
"build:runtime": "node build/build.js runtime",
"install:buildtools": "npm i rollup rollup-watch rollup-plugin-buble rollup-plugin-json rollup-plugin-eslint rollup-plugin-commonjs rollup-plugin-flow rollup-plugin-flow-no-whitespace rollup-plugin-postcss rollup-plugin-replace rollup-plugin-uglify rollup-plugin-node-resolve wwp flow-bin babel-core babel-eslint babel-istanbul babel-loader babel-plugin-coverage babel-preset-es2015 babel-runtime eslint-plugin-flowtype",
@@ -53,8 +53,8 @@
"build:ci:native": "webpack --watch --config build/webpack.ci.config.js",
"build:ci": "npm run build:ci:native && npm run build:ci:web",
"build": "npm run build:native && npm run build:browser && npm run build:vue && npm run build:examples && npm run build:test",
- "dist:vue": "npm run build:vue && bash ./bin/dist-vue.sh",
- "dist:browser": "npm run build:browser && npm run build:browser:common && bash ./bin/dist-browser.sh",
+ "dist:vue": "npm run build:vue && bash ./scripts/dist-vue.sh",
+ "dist:browser": "npm run build:browser && npm run build:browser:common && bash ./scripts/dist-browser.sh",
"dist": "npm run dist:browser && npm run dist:vue",
"dev:native": "node build/build.js native --watch",
"dev:runtime": "node build/build.js runtime --watch",
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/build_from_source.sh
----------------------------------------------------------------------
diff --git a/scripts/build_from_source.sh b/scripts/build_from_source.sh
index f681273..f73ed5f 100644
--- a/scripts/build_from_source.sh
+++ b/scripts/build_from_source.sh
@@ -21,7 +21,7 @@ if [ ! -f scripts/build_from_source.sh ];then
echo "This script must execute in project root"
exit 1
fi
-PROJECT_DIR=$(pwd)
+
echo "Build Weex SDK From Source...."
npm install --production
@@ -31,15 +31,13 @@ npm run build:source
echo "Javascript Framework and HTML5 SDK build completed."
sleep 2
-cp dist/native.min.js ios/sdk/WeexSDK/Resources/main.js
-cp dist/native.min.js android/sdk/assets/main.js
+cp dist/native.min.js ios_sdk/WeexSDK/Resources/main.js
+cp dist/native.min.js android_sdk/assets/main.js
-cd android
gradle wrapper --gradle-version 2.14.1
-echo 'include ":sdk"'>settings.gradle
-./gradlew :sdk:assemble -PasfRelease
-cd $PROJECT_DIR
+echo 'include ":android_sdk"'>settings.gradle
+./gradlew :android_sdk:assemble -PasfRelease
-xcodebuild -project ios/sdk/WeexSDK.xcodeproj -target WeexSDK_MTL
+xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL
echo "Weex SDK Build completed."
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/commit-msg.sh
----------------------------------------------------------------------
diff --git a/scripts/commit-msg.sh b/scripts/commit-msg.sh
new file mode 100755
index 0000000..64381a9
--- /dev/null
+++ b/scripts/commit-msg.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Validate commit log
+commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] .{1,50}'
+
+if ! grep -iqE "$commit_regex" "$1"; then
+ echo "ERROR: commit log format is not correct!"
+ echo "See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#commit-log"
+ exit 1
+fi
+# FIXME no effect after editor (like vim) exits
+# ISSUE merge or conflict
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/dist-browser.sh
----------------------------------------------------------------------
diff --git a/scripts/dist-browser.sh b/scripts/dist-browser.sh
new file mode 100755
index 0000000..2ad1f84
--- /dev/null
+++ b/scripts/dist-browser.sh
@@ -0,0 +1,60 @@
+#!/user/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo ''
+echo ''
+echo 'packing weex-html5 for distribution...'
+
+src_dir=./html5
+base_dir=./packages/weex-html5
+dist_dir=${base_dir}/dist
+
+# get version of weex-html5 from subversion of main package.json.
+pkg=./package.json
+dist_pkg=${base_dir}/package.json
+version=$( grep -o -E "\"browser\": \"([0-9.]+)\"" ${pkg} | grep -o -E "[0-9.]+" )
+transformerVersion=$( grep -o -E "\"transformer\": \"([>=< 0-9.]+)\"" ${pkg} | grep -o -E "[>=< 0-9.]+")
+echo "version:" ${version}
+echo "availableTransfomer version:" ${transformerVersion}
+
+# update package.json for weex-html5 package.
+cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g" > ${base_dir}/tmp.json
+# cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g;s/\"transformer\": \"[>=< 0-9.]*\"/\"transformer\": \"${transformerVersion}\"/g" > ${base_dir}/tmp.json
+rm ${dist_pkg}
+mv ${base_dir}/tmp.json ${dist_pkg}
+
+# prepare dist directory to put weex files.
+if [ -e $dist_dir ]
+ then rm -rf $dist_dir
+fi
+
+mkdir $dist_dir
+
+cp ./dist/browser.js ${dist_dir}/weex.js
+cp ./dist/browser.common.js ${dist_dir}/weex.common.js
+# cp ${dist_dir}/weex.js ${dist_dir}/weex.common.js
+echo -e "\nmodule.exports = global.weex;" >> ${dist_dir}/weex.common.js
+
+uglifyjs ${dist_dir}/weex.js -o ${dist_dir}/weex.min.js
+
+# rm -rf ${base_dir}/src
+# cp -fR ${src_dir} ${base_dir}/src
+
+echo 'packing finished.'
+echo ''
+echo ''
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/dist-js-framework.sh
----------------------------------------------------------------------
diff --git a/scripts/dist-js-framework.sh b/scripts/dist-js-framework.sh
new file mode 100755
index 0000000..f814186
--- /dev/null
+++ b/scripts/dist-js-framework.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo 'packing weex-js-framework'
+
+config=./html5/runtime/config.js
+
+if ! [ -e $config ]; then
+ echo "build JS Framework config"
+ npm run build:config
+fi
+
+cd dist/weex-js-framework
+
+rm -Rf src
+mkdir src
+cp ../../.babelrc .
+cp -Rf ../../html5/* src/
+rm -Rf src/render/browser
+rm -Rf src/test
+
+if [ $# -gt 0 ]; then
+ if ! [ -e .git ]; then
+ echo "init git first"
+ git init
+ fi
+ echo "version specified! $1"
+ npm version $1
+ rm -Rf .git
+ version=$( grep -o -E "\"version\": \"([0-9.]+)\"" package.json | grep -o -E "[0-9.]+" )
+ sed -i .tmp "s/\"framework\": \"[0-9.]*\"/\"framework\": \"${version}\"/g" package.json
+ rm package.json.tmp
+ sed -i .tmp "s/\"framework\": \"[0-9.]*\"/\"framework\": \"${version}\"/g" ../../package.json
+ rm ../../package.json.tmp
+else
+ echo "please pass a <version> or patch | minor | major"
+fi
+
+cd ../../
+
+echo 'packing finished.'
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/dist-vue.sh
----------------------------------------------------------------------
diff --git a/scripts/dist-vue.sh b/scripts/dist-vue.sh
new file mode 100644
index 0000000..60fce06
--- /dev/null
+++ b/scripts/dist-vue.sh
@@ -0,0 +1,58 @@
+#!/user/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+echo ''
+# echo ' => cping files for vue dist...'
+
+base_dir=./packages/weex-vue-render
+src_dir=./html5
+vue_dir=${src_dir}/render/vue
+
+# browser_dir=${src_dir}/render/browser
+# shared_dir=${src_dir}/shared
+
+# dist_dir=./packages/weex-vue-render/src
+
+# rm -rf ${dist_dir}
+
+# mkdir $dist_dir
+# mkdir $dist_dir/render
+
+# cp -fR ${browser_dir} ${dist_dir}/render/
+# cp -fR ${vue_dir} ${dist_dir}/render/
+# cp -fR ${shared_dir} ${dist_dir}/
+
+echo " => cp READEME.md to dist path..."
+
+cp -f ${vue_dir}/README.md ${base_dir}/
+
+echo " => writing version number into weex-vue-render's package.json..."
+
+# get version of weex-html5 from subversion of main package.json.
+pkg=./package.json
+dist_pkg=${base_dir}/package.json
+version=$( grep -o -E "\"vue-render\": \"([0-9.]+)\"" ${pkg} | grep -o -E "[0-9.]+" )
+echo " => version:" ${version}
+
+# update package.json for weex-html5 package.
+cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g" > ${base_dir}/tmp.json
+# cat ${dist_pkg} | sed "s/\"version\": \"[0-9.]*\"/\"version\": \"${version}\"/g;s/\"transformer\": \"[>=< 0-9.]*\"/\"transformer\": \"${transformerVersion}\"/g" > ${base_dir}/tmp.json
+rm ${dist_pkg}
+mv ${base_dir}/tmp.json ${dist_pkg}
+
+echo ' => writing finished.'
+echo ''
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/generate_apache_release.sh
----------------------------------------------------------------------
diff --git a/scripts/generate_apache_release.sh b/scripts/generate_apache_release.sh
new file mode 100755
index 0000000..3962e0d
--- /dev/null
+++ b/scripts/generate_apache_release.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -eu
+if [ ! -f scripts/build_from_source.sh ];then
+ echo "This script must execute in project root"
+ exit 1
+fi
+
+dest='apache_release_temp'
+
+rm -rf $dest
+mkdir $dest
+rsync -rvv --include-from=scripts/release_files.rules ./ $dest
+
+mv $dest/ios/sdk $dest/ios_sdk
+rm -rf $dest/ios
+
+mv $dest/android/sdk $dest/android_sdk
+mv $dest/android/build.gradle $dest/build.gradle
+rm -rf $dest/android
+
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/install-hooks.sh
----------------------------------------------------------------------
diff --git a/scripts/install-hooks.sh b/scripts/install-hooks.sh
new file mode 100755
index 0000000..480fbd2
--- /dev/null
+++ b/scripts/install-hooks.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+if test -e .git/hooks; then
+ ln -sf ../../scripts/pre-commit.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
+ ln -sf ../../scripts/commit-msg.sh .git/hooks/commit-msg && chmod +x .git/hooks/commit-msg
+ ln -sf ../../scripts/pre-push.sh .git/hooks/pre-push && chmod +x .git/hooks/pre-push
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/pre-commit.sh
----------------------------------------------------------------------
diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh
new file mode 100755
index 0000000..8723e25
--- /dev/null
+++ b/scripts/pre-commit.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+sh ./bin/welcome.sh
+
+# Validate email
+email=$(git config user.email | grep -E 'alibaba-inc.com|taobao.com|tmall.com|1688.com')
+if [ "$email" != "" ];then
+ echo "ERROR: Your git repo email is '$email'. Please run:\n"
+ echo " git config user.email 'your.github@binded.email'\n"
+ exit 1
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/pre-push.sh
----------------------------------------------------------------------
diff --git a/scripts/pre-push.sh b/scripts/pre-push.sh
new file mode 100755
index 0000000..d8dc4c1
--- /dev/null
+++ b/scripts/pre-push.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Validate branch name
+branch_regex="^(\d+\.\d+\.\d+)|(master|dev|android|ios|jsfm|html5|component|doc|website|example|test|all)(-(bugfix|feature|hotfix)-.+)?$"
+branch_name=$(git rev-parse --abbrev-ref HEAD)
+
+if ! (echo $branch_name | grep -iqE "$branch_regex"); then
+ echo "ERROR: current branch is \"$branch_name\", name format is not correct!
+
+See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-name\n"
+ exit 1
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/release.sh
----------------------------------------------------------------------
diff --git a/scripts/release.sh b/scripts/release.sh
new file mode 100644
index 0000000..003e0a4
--- /dev/null
+++ b/scripts/release.sh
@@ -0,0 +1,20 @@
+# Export bugfix log
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\].*(fix|bug|close)" > commit-history.log
+
+# git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\]" > commit-history.log
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/release_files.rules
----------------------------------------------------------------------
diff --git a/scripts/release_files.rules b/scripts/release_files.rules
index 75f34a2..14190ca 100644
--- a/scripts/release_files.rules
+++ b/scripts/release_files.rules
@@ -10,6 +10,11 @@
+ /scripts/
+ /scripts/rat-ant-build.xml
+ /scripts/build_from_source.sh
++ /scripts/dist-*.sh
++ /scripts/install-hooks.sh
++ /scripts/pre-commit.sh
++ /scripts/pre-push.sh
++ /scripts/commit-msg.sh
+ /LICENSE
+ /NOTICE
+ /POSSIBLE-NOTICES-FOR-BIN-DIST
@@ -22,8 +27,6 @@
+ /.eslintrc
+ /.eslintignore
+ /.babelrc
-+ /bin
-+ /bin/*.sh
+ /src
- /src/h5-render/dist/index.js
- /src/h5-render/node_modules
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7701f178/scripts/welcome.sh
----------------------------------------------------------------------
diff --git a/scripts/welcome.sh b/scripts/welcome.sh
new file mode 100644
index 0000000..555d7d6
--- /dev/null
+++ b/scripts/welcome.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+if ! test -e ./scripts/.welcome; then
+ touch ./scripts/.welcome
+ echo '********************************************************************************'
+ echo '* *'
+ echo '* Thanks for contributing Weex! *'
+ echo '* See https://github.com/alibaba/weex/blob/master/CONTRIBUTING.md *'
+ echo '* *'
+ echo '********************************************************************************\n'
+fi
\ No newline at end of file