yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject yetus git commit: YETUS-358 specify bsdtar for source artifact build.
Date Sun, 03 Apr 2016 22:22:15 GMT
Repository: yetus
Updated Branches:
  refs/heads/YETUS-344 53bb6749c -> 07cfe2ece


YETUS-358 specify bsdtar for source artifact build.

Signed-off-by: Marco Zuehlke <mzuehlke@gmail.com>
Signed-off-by: Kengo Seki <sekikn@apache.org>


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

Branch: refs/heads/YETUS-344
Commit: 07cfe2ece72e382d2a9df258bdbaab22e6e8624b
Parents: 53bb674
Author: Sean Busbey <busbey@apache.org>
Authored: Thu Mar 31 20:47:00 2016 -0500
Committer: Sean Busbey <busbey@apache.org>
Committed: Sun Apr 3 17:21:42 2016 -0500

----------------------------------------------------------------------
 build.sh | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/07cfe2ec/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
index 6b23683..ebf2872 100755
--- a/build.sh
+++ b/build.sh
@@ -29,10 +29,12 @@
 ## @audience     private
 ## @stability    evolving
 ## @replaceable  no
+## @param        true iff this is a release build
 ## @return       1 - Some dependencies are missing
 ## @return       0 - All dependencies exist
 function detect_dependencies
 {
+  declare is_release=$1
   local exit_code=0
   if ! [ -x "$(command -v java)" ]; then
     echo "Java not found! Must install JDK version >= 1.7" >&2
@@ -49,6 +51,16 @@ function detect_dependencies
     exit_code=1
   fi
 
+  if ! [ -x "$(command -v tar)" ]; then
+    echo "Building archives requires the 'tar' command." >&2
+    exit_code=1
+  fi
+
+  if [ "${is_release}" = "true" ] && ! [ -x "$(command -v bsdtar)" ]; then
+    echo "building the release source archive requires the 'bsdtar' command." >&2
+    exit_code=1
+  fi
+
   if [[ "${exit_code}" -ne "0" ]]; then
     echo "Some dependencies are missing. Exit now." >&2
   fi
@@ -70,7 +82,7 @@ done
 
 echo "working on version '${YETUS_VERSION}'"
 
-detect_dependencies
+detect_dependencies "${release}"
 mkdir -p target
 
 if [ "${offline}" != "true" ]; then
@@ -106,8 +118,8 @@ if [ "${release}" = "true" ]; then
   echo "creating source tarball at '$(pwd)/target/'"
   rm "target/yetus-${YETUS_VERSION}-src".tar* 2>/dev/null || true
   current=$(basename "$(pwd)")
-  tar -s "/${current}/yetus-${YETUS_VERSION}/" -C ../ -cf "target/yetus-${YETUS_VERSION}-src.tar"
--exclude '*/target/*' --exclude '*/publish/*' --exclude '*/.git/*' "${current}"
-  tar -s "/target/yetus-${YETUS_VERSION}/" -rf "target/yetus-${YETUS_VERSION}-src.tar" target/RELEASENOTES.md
target/CHANGES.md
+  bsdtar -s "/${current}/yetus-${YETUS_VERSION}/" -C ../ -cf "target/yetus-${YETUS_VERSION}-src.tar"
--exclude '*/target/*' --exclude '*/publish/*' --exclude '*/.git/*' "${current}"
+  bsdtar -s "/target/yetus-${YETUS_VERSION}/" -rf "target/yetus-${YETUS_VERSION}-src.tar"
target/RELEASENOTES.md target/CHANGES.md
   gzip "target/yetus-${YETUS_VERSION}-src.tar"
 fi
 


Mime
View raw message