incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Add release scripts for easier release processing.
Date Wed, 04 Feb 2015 21:38:24 GMT
Add release scripts for easier release processing.


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

Branch: refs/heads/master
Commit: fb0368de885ed099e5b1b55d5220547641f58c90
Parents: fc499b4
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Feb 4 16:38:10 2015 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Feb 4 16:38:10 2015 -0500

----------------------------------------------------------------------
 build_release.sh                     |  35 ----------
 release_scripts/build_release.sh     | 104 ++++++++++++++++++++++++++++++
 release_scripts/hadoop1.versions     |  16 +++++
 release_scripts/hadoop2-mr1.versions |  16 +++++
 release_scripts/hadoop2.versions     |  18 ++++++
 release_scripts/release_profiles.txt |  18 ++++++
 6 files changed, 172 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/build_release.sh
----------------------------------------------------------------------
diff --git a/build_release.sh b/build_release.sh
deleted file mode 100755
index 202e5fc..0000000
--- a/build_release.sh
+++ /dev/null
@@ -1,35 +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 [ -z "$1" ]; then
-  echo "No output directory specified."
-fi
-OUTPUT_DIR=$1
-mvn clean -Dhadoop1
-mvn install -Dhadoop1 -Djava.awt.headless=true
-mvn site -Ddependency.locations.enabled=false -DskipTests -Dhadoop1 -Djava.awt.headless=true
-mvn site:stage -DskipTests -Dhadoop1 -Djava.awt.headless=true
-mvn package -DskipTests -Dhadoop1 -Djava.awt.headless=true
-cp distribution/target/*-bin.tar.gz $OUTPUT_DIR
-cp distribution/target/*-src.tar.gz $OUTPUT_DIR
-
-mvn clean -Dhadoop2
-mvn install -Dhadoop2 -Djava.awt.headless=true
-mvn site -Ddependency.locations.enabled=false -DskipTests -Dhadoop2 -Djava.awt.headless=true
-mvn site:stage -DskipTests -Dhadoop2 -Djava.awt.headless=true
-mvn package -DskipTests -Dhadoop2 -Djava.awt.headless=true
-cp distribution/target/*-bin.tar.gz $OUTPUT_DIR
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/release_scripts/build_release.sh
----------------------------------------------------------------------
diff --git a/release_scripts/build_release.sh b/release_scripts/build_release.sh
new file mode 100755
index 0000000..f3b7993
--- /dev/null
+++ b/release_scripts/build_release.sh
@@ -0,0 +1,104 @@
+#!/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.
+
+function stopOnError {
+  echo "#####################"
+  echo "Running '$@'" >&2
+  echo "#####################"
+  "$@"
+  local status=$?
+  if [ $status -ne 0 ]; then
+    echo "Error running '$@'" >&2
+    exit $status
+  fi
+}
+
+if [ -z "$JAVA_HOME" ]; then
+  cat 1>&2 <<EOF
++======================================================================+
+|      Error: JAVA_HOME is not set and Java could not be found         |
++----------------------------------------------------------------------+
+| Please download the latest Sun JDK from the Sun Java web site        |
+|       > http://java.sun.com/javase/downloads/ <                      |
+|                                                                      |
+| Hadoop and Blur requires Java 1.6 or later.                          |
+| NOTE: This script will find Sun Java whether you install using the   |
+|       binary or the RPM based installer.                             |
++======================================================================+
+EOF
+  exit 1
+fi
+
+
+version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
+if [[ "$version" == "1.6."* ]]; then
+  echo Java Version is 1.6 ["$version"]
+else
+  echo Java Version not 1.6 actual ["$version"]
+  exit 1
+fi
+
+version=$($JAVA_HOME/bin/java -version 2>&1 | awk -F '"' '/version/ {print $2}')
+if [[ "$version" == "1.6."* ]]; then
+  echo JAVA_HOME Java Version is 1.6 ["$version"]
+else
+  echo JAVA_HOME Java Version not 1.6 actual ["$version"]
+  exit 1
+fi
+
+RELEASE_SCRIPTS_DIR=`dirname "$0"`
+RELEASE_SCRIPTS_DIR=`cd "$RELEASE_SCRIPTS_DIR"; pwd`
+
+PROJECT_BASE=$RELEASE_SCRIPTS_DIR/../
+
+if [ -z "$1" ]; then
+  echo "No output directory specified."
+  exit 1
+fi
+
+OUTPUT_DIR=$1
+
+if [ ! -d $OUTPUT_DIR ]; then
+  echo "Output directory [${OUTPUT_DIR}] does not exist."
+  exit 1
+else
+  stopOnError touch $OUTPUT_DIR/test
+  stopOnError rm $OUTPUT_DIR/test
+fi
+
+PROFILE_FILE='release_profiles.txt'
+PROFILE_LINES=`cat $PROFILE_FILE | grep -v \#`
+
+for PROFILE in $PROFILE_LINES ; do
+  cd $PROJECT_BASE
+  HADOOP_VERSIONS_FILE="$RELEASE_SCRIPTS_DIR/${PROFILE}.versions"
+  HADOOP_VERSIONS_LINES=`cat $HADOOP_VERSIONS_FILE | grep -v \#`
+  for HADOOP_VERSION in $HADOOP_VERSIONS_LINES ; do
+    stopOnError mvn clean -D${PROFILE} -Dhadoop.version=$HADOOP_VERSION -Djava.awt.headless=true
+    stopOnError mvn install -D${PROFILE} -Dhadoop.version=$HADOOP_VERSION -Djava.awt.headless=true
+    stopOnError mvn site -Ddependency.locations.enabled=false -DskipTests -D${PROFILE} -Dhadoop.version=$HADOOP_VERSION
-Djava.awt.headless=true
+    stopOnError mvn site:stage -DskipTests -D${PROFILE} -Dhadoop.version=$HADOOP_VERSION
-Djava.awt.headless=true
+    stopOnError mvn package -DskipTests -D${PROFILE} -Dhadoop.version=$HADOOP_VERSION -Djava.awt.headless=true
+    stopOnError cp distribution/target/*-bin.tar.gz $OUTPUT_DIR
+    stopOnError cp distribution/target/*-src.tar.gz $OUTPUT_DIR
+  done
+done
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/release_scripts/hadoop1.versions
----------------------------------------------------------------------
diff --git a/release_scripts/hadoop1.versions b/release_scripts/hadoop1.versions
new file mode 100644
index 0000000..a692ebd
--- /dev/null
+++ b/release_scripts/hadoop1.versions
@@ -0,0 +1,16 @@
+# 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.
+
+1.2.1

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/release_scripts/hadoop2-mr1.versions
----------------------------------------------------------------------
diff --git a/release_scripts/hadoop2-mr1.versions b/release_scripts/hadoop2-mr1.versions
new file mode 100644
index 0000000..361f7f9
--- /dev/null
+++ b/release_scripts/hadoop2-mr1.versions
@@ -0,0 +1,16 @@
+# 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.
+
+2.5.0-mr1-cdh5.3.1

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/release_scripts/hadoop2.versions
----------------------------------------------------------------------
diff --git a/release_scripts/hadoop2.versions b/release_scripts/hadoop2.versions
new file mode 100644
index 0000000..f855565
--- /dev/null
+++ b/release_scripts/hadoop2.versions
@@ -0,0 +1,18 @@
+# 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.
+
+2.6.0
+2.5.0-cdh5.3.1
+2.6.0.2.2.0.0-2041

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb0368de/release_scripts/release_profiles.txt
----------------------------------------------------------------------
diff --git a/release_scripts/release_profiles.txt b/release_scripts/release_profiles.txt
new file mode 100644
index 0000000..c587bf4
--- /dev/null
+++ b/release_scripts/release_profiles.txt
@@ -0,0 +1,18 @@
+# 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.
+
+hadoop1
+hadoop2-mr1
+hadoop2


Mime
View raw message