avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject avro git commit: AVRO-1919: Formalize the presence of build.sh. Contributed by Suraj Acharya.
Date Mon, 26 Sep 2016 22:35:05 GMT
Repository: avro
Updated Branches:
  refs/heads/master fcd0a65f6 -> ab25bf203


AVRO-1919: Formalize the presence of build.sh.  Contributed by Suraj Acharya.


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

Branch: refs/heads/master
Commit: ab25bf2037f98a2fc99179b8ee175d3d876f87b3
Parents: fcd0a65
Author: Doug Cutting <cutting@apache.org>
Authored: Mon Sep 26 14:21:58 2016 -0700
Committer: Doug Cutting <cutting@apache.org>
Committed: Mon Sep 26 14:24:26 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt        |  2 ++
 build.sh           | 25 +++++++------------
 lang/java/build.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++
 lang/perl/build.sh | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
 lang/py/build.sh   | 60 ++++++++++++++++++++++++++++++++++++++++++++
 lang/py3/build.sh  | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 267 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 28fdf93..eb5c3b2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -27,6 +27,8 @@ Trunk (not yet released)
 
     AVRO-1879: Make conversions field static. (Michael Wong via blue)
 
+    AVRO-1919: Formalize the presence of build.sh. (Suraj Acharya via cutting)
+
   BUG FIXES
 
     AVRO-1741: Python3: Fix error when codec is not in the header.

http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
index c0c31df..67f11a4 100755
--- a/build.sh
+++ b/build.sh
@@ -39,16 +39,16 @@ do
 
     test)
       # run lang-specific tests
-      (cd lang/java; mvn test)
-      (cd lang/py; ant test)
-      (cd lang/py3; python3 setup.py test)
+      (cd lang/java; ./build.sh test)
+      (cd lang/py; ./build.sh test)
+      (cd lang/py3; ./build.sh test)
       (cd lang/c; ./build.sh test)
       (cd lang/c++; ./build.sh test)
       (cd lang/csharp; ./build.sh test)
       (cd lang/js; ./build.sh test)
       (cd lang/ruby; ./build.sh test)
       (cd lang/php; ./build.sh test)
-      (cd lang/perl; perl ./Makefile.PL && make test)
+      (cd lang/perl; ./build.sh test)
 
       # create interop test data
       mkdir -p build/interop/data
@@ -105,15 +105,12 @@ do
 
       # build lang-specific artifacts
 
-      (cd lang/java; mvn package -DskipTests -Dhadoop.version=1;
-      rm -rf mapred/target/{classes,test-classes}/;
-      rm -rf trevni/avro/target/{classes,test-classes}/;
-      mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate)
+      (cd lang/java;./build.sh dist)
       (cd lang/java/trevni/doc; mvn site)
       (mvn -N -P copy-artifacts antrun:run)
 
-      (cd lang/py; ant dist)
-      (cd lang/py3; python3 setup.py sdist; cp -r dist ../../dist/py3)
+      (cd lang/py; ./build.sh dist)
+      (cd lang/py3; ./build.sh dist)
 
       (cd lang/c; ./build.sh dist)
 
@@ -128,7 +125,7 @@ do
       (cd lang/php; ./build.sh dist)
 
       mkdir -p dist/perl
-      (cd lang/perl; perl ./Makefile.PL && make dist)
+      (cd lang/perl; ./build.sh dist)
       cp lang/perl/Avro-$VERSION.tar.gz dist/perl/
 
       # build docs
@@ -194,11 +191,7 @@ do
 
       (cd lang/php; ./build.sh clean)
 
-      (cd lang/perl; [ ! -f Makefile ] || make clean)
-      rm -f  lang/perl/Avro-*.tar.gz
-      rm -f  lang/perl/META.yml
-      rm -f  lang/perl/Makefile.old
-      rm -rf lang/perl/inc/
+      (cd lang/perl; ./build.sh clean)
       ;;
 
     docker)

http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/lang/java/build.sh
----------------------------------------------------------------------
diff --git a/lang/java/build.sh b/lang/java/build.sh
new file mode 100755
index 0000000..40d32c5
--- /dev/null
+++ b/lang/java/build.sh
@@ -0,0 +1,66 @@
+#!/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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+function do_dist() {
+  mvn package -DskipTests -Dhadoop.version=1;
+  rm -rf mapred/target/{classes,test-classes}/;
+  rm -rf trevni/avro/target/{classes,test-classes}/;
+  mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate
+}
+
+case "$target" in
+  test)
+    mvn test
+    ;;
+
+  dist)
+    do_dist
+    ;;
+
+  clean)
+    mvn clean
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0

http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/lang/perl/build.sh
----------------------------------------------------------------------
diff --git a/lang/perl/build.sh b/lang/perl/build.sh
new file mode 100755
index 0000000..d2028ec
--- /dev/null
+++ b/lang/perl/build.sh
@@ -0,0 +1,65 @@
+#!/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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+function do_clean(){
+  [ ! -f Makefile ] || make clean
+  rm -f  Avro-*.tar.gz META.yml Makefile.old
+  rm -rf lang/perl/inc/
+}
+
+case "$target" in
+  test)
+    perl ./Makefile.PL && make test
+    ;;
+
+  dist)
+     perl ./Makefile.PL && make dist
+    ;;
+
+  clean)
+    do_clean
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0

http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/lang/py/build.sh
----------------------------------------------------------------------
diff --git a/lang/py/build.sh b/lang/py/build.sh
new file mode 100755
index 0000000..0169b0b
--- /dev/null
+++ b/lang/py/build.sh
@@ -0,0 +1,60 @@
+#!/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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+case "$target" in
+  test)
+    ant test
+    ;;
+
+  dist)
+     ant dist
+    ;;
+
+  clean)
+    ant clean
+    rm -rf userlogs/
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0

http://git-wip-us.apache.org/repos/asf/avro/blob/ab25bf20/lang/py3/build.sh
----------------------------------------------------------------------
diff --git a/lang/py3/build.sh b/lang/py3/build.sh
new file mode 100755
index 0000000..fdb457a
--- /dev/null
+++ b/lang/py3/build.sh
@@ -0,0 +1,65 @@
+#!/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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+function do_clean(){
+  python3 setup.py clean
+  rm -rvf dist avro_python3.egg-info avro/*.avsc avro/VERSION.txt avro/__pycache__/ avro/tests/interop.avsc
avro/tests/__pycache__/
+}
+
+case "$target" in
+  test)
+    python3 setup.py test
+    ;;
+
+  dist)
+     python3 setup.py sdist
+     cp -r dist ../../dist/py3
+    ;;
+
+  clean)
+    do_clean
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0


Mime
View raw message