From 463f8530146f1106de92cc807318dcf0bc1af5c0 Mon Sep 17 00:00:00 2001 From: Bogdan Pintea Date: Tue, 13 Apr 2021 12:49:41 +0200 Subject: [PATCH] Update Tableau connector generation scripts (#71614) This updates the output directory, to better align with the stack building infrastructure. (cherry picked from commit 6d1d8dc736382bc393aa4be147bc43d1194762c3) --- x-pack/plugin/sql/connectors/tableau/package.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/sql/connectors/tableau/package.sh b/x-pack/plugin/sql/connectors/tableau/package.sh index 09696de476c8d..df01990223fad 100755 --- a/x-pack/plugin/sql/connectors/tableau/package.sh +++ b/x-pack/plugin/sql/connectors/tableau/package.sh @@ -17,6 +17,7 @@ TAB_SDK_TAG="tdvt-2.1.9" MY_NAME="Packager for Elastic's Tableau connector to Elasticsearch" MY_FILE=$(basename $0) MY_WORKSPACE=$(realpath ${PACKAGE_WORKSPACE:-build}) +MY_OUT_DIR=$MY_WORKSPACE/distributions MY_TOP_DIR=$(dirname $(realpath $0)) SRC_DIR=connector @@ -82,14 +83,16 @@ function package() { # finally, create the connector python -m connector_packager.package $MY_WORKSPACE/$SRC_DIR - cp -f packaged-connector/$OUT_TACO $MY_WORKSPACE/$ES_TACO + mkdir -p $MY_OUT_DIR + cp -f packaged-connector/$OUT_TACO $MY_OUT_DIR/$ES_TACO - log "TACO packaged under: $MY_WORKSPACE/$ES_TACO" + log "TACO packaged under: $MY_OUT_DIR/$ES_TACO" } function sha() { - cd $MY_WORKSPACE + cd $MY_OUT_DIR sha512sum $ES_TACO > $ES_TACO.sha512 + echo $(cat $ES_TACO.sha512) } # Vars: @@ -201,7 +204,7 @@ function read_cmd_params() { } function sign() { - for taco in $(ls -t $MY_WORKSPACE/*.taco 2>/dev/null); do + for taco in $(ls -t $MY_OUT_DIR/*.taco 2>/dev/null); do jarsigner $taco $SIGN_PARAMS jarsigner -verify -verbose -certs $taco @@ -210,7 +213,7 @@ function sign() { done if [ -z $taco ]; then - die "No connector to sign found under: $MY_WORKSPACE/" \ + die "No connector to sign found under: $MY_OUT_DIR/" \ "\nCall 'assemble' first." fi