Skip to content

Commit

Permalink
Improve osd components repo cleanup logics (#4351)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon authored Jan 17, 2024
1 parent f37c31c commit ca0c930
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions scripts/components/ganttChartDashboards/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
set -ex

# vars / libs
. ../../../lib/shell/file_management.sh
PLUGIN_PATH=$PWD
SCRIPT_DIR=`dirname $(realpath $0)`
. $SCRIPT_DIR/../../../lib/shell/file_management.sh
# For hybrid plugin it actually resides in 'dashboards-visualizations/gantt-chart'
PLUGIN_FOLDER=$(basename "$PWD")
PLUGIN_NAME=$(basename $(dirname "$PWD"))
PLUGIN_PATH="../../OpenSearch-Dashboards/plugins/$PLUGIN_FOLDER"

function usage() {
echo "Usage: $0 [args]"
Expand Down Expand Up @@ -83,9 +87,6 @@ if [ "$PLATFORM" = "windows" ]; then
fi

mkdir -p $OUTPUT/plugins
# For hybrid plugin it actually resides in 'ganttChartDashboards/gantt-chart'
PLUGIN_FOLDER=$(basename "$PWD")
PLUGIN_NAME=$(basename $(dirname "$PWD"))
# TODO: [CLEANUP] Needed OpenSearch Dashboards git repo to build the required modules for plugins
# This makes it so there is a dependency on having Dashboards pulled already.
cp -r ../$PLUGIN_FOLDER/ ../../OpenSearch-Dashboards/plugins
Expand Down
7 changes: 4 additions & 3 deletions scripts/default/opensearch-dashboards/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
set -ex

# vars / libs
. ../../../lib/shell/file_management.sh
PLUGIN_PATH=$PWD
SCRIPT_DIR=`dirname $(realpath $0)`
. $SCRIPT_DIR/../../../lib/shell/file_management.sh
PLUGIN_NAME=$(basename "$PWD")
PLUGIN_PATH="../OpenSearch-Dashboards/plugins/$PLUGIN_NAME"

function usage() {
echo "Usage: $0 [args]"
Expand Down Expand Up @@ -91,7 +93,6 @@ else
fi

mkdir -p $OUTPUT/plugins
PLUGIN_NAME=$(basename "$PWD")
# TODO: [CLEANUP] Needed OpenSearch Dashboards git repo to build the required modules for plugins
# This makes it so there is a dependency on having Dashboards pulled already.
cp -r ../$PLUGIN_NAME/ ../OpenSearch-Dashboards/plugins
Expand Down

0 comments on commit ca0c930

Please sign in to comment.