You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2019/01/30 20:45:54 UTC

[kudu] 02/03: [build] Improve mini cluster artifact name

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 4d4c5e1f4b2348cd2552fe1d78372412bca134e7
Author: Grant Henke <gr...@apache.org>
AuthorDate: Wed Jan 30 13:13:56 2019 -0600

    [build] Improve mini cluster artifact name
    
    Adjust the name of the artifact/jar to include the OS and
    architecture that matches the expected Maven format
    for compatibility with the os-maven-plugin.
    
    As an example, this artifact name matches the protoc
    artifact name structure:
    http://central.maven.org/maven2/com/google/protobuf/protoc/3.6.1/
    
    Change-Id: I75007d3623aa3c3d06dea083d5d25f241ca1c73c
    Reviewed-on: http://gerrit.cloudera.org:8080/12312
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 build-support/build_mini_cluster_binaries.sh        |  2 +-
 build-support/relocate_binaries_for_mini_cluster.py | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/build-support/build_mini_cluster_binaries.sh b/build-support/build_mini_cluster_binaries.sh
index aac4e4a..32ec346 100755
--- a/build-support/build_mini_cluster_binaries.sh
+++ b/build-support/build_mini_cluster_binaries.sh
@@ -74,7 +74,7 @@ make -j$NUM_PROCS $TARGETS
 # Relocate the binaries.
 $SOURCE_ROOT/build-support/relocate_binaries_for_mini_cluster.py $BUILD_ROOT $TARGETS
 
-ARTIFACT_NAME=$(ls -d apache-kudu-* | sed 's#/##' | head -1)
+ARTIFACT_NAME=$(ls -d kudu-binary* | sed 's#/##' | head -1)
 
 # Strip everything to minimize the size of the tarball we generate.
 echo Stripping symbols...
diff --git a/build-support/relocate_binaries_for_mini_cluster.py b/build-support/relocate_binaries_for_mini_cluster.py
index aa12fc6..182ae8b 100755
--- a/build-support/relocate_binaries_for_mini_cluster.py
+++ b/build-support/relocate_binaries_for_mini_cluster.py
@@ -184,11 +184,18 @@ def get_dep_library_paths_macos(binary_path):
 
 def get_artifact_name():
   """
-  Read the Kudu version to create an archive with an appropriate name.
+  Create an archive with an appropriate name. Including version, OS, and architecture.
   """
+  if IS_LINUX:
+    os_str = "linux"
+  elif IS_MACOS:
+    os_str = "osx"
+  else:
+    raise NotImplementedError("Unsupported platform")
+  arch = os.uname()[4]
   with open(os.path.join(SOURCE_ROOT, "version.txt"), 'r') as version:
     version = version.readline().strip().decode("utf-8")
-  artifact_name = "apache-kudu-%s" % (version, )
+  artifact_name = "kudu-binary-%s-%s-%s" % (version, os_str, arch)
   return artifact_name
 
 def mkconfig(build_root, artifact_root):