File tree Expand file tree Collapse file tree 1 file changed +29
-5
lines changed
scripts/components/OpenSearch Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -72,18 +72,42 @@ mkdir -p $OUTPUT/maven/org/opensearch
72
72
# Copy maven publications to be promoted
73
73
cp -r ./build/local-test-repo/org/opensearch " ${OUTPUT} " /maven/org
74
74
75
+ # Assemble distribution artifact
76
+ # see https://github.com/opensearch-project/OpenSearch/blob/main/settings.gradle#L34 for other distribution targets
77
+
75
78
[ -z " $PLATFORM " ] && PLATFORM=` uname -s` | awk ' {print tolower($0)}'
76
79
[ -z " $ARCHITECTURE " ] && ARCHITECTURE=` uname -m`
77
80
78
- # Assemble distribution artifact
79
- # see https://github.com/opensearch-project/OpenSearch/blob/main/settings.gradle#L34 for other distribution targets
81
+ case " $( uname -s) " in
82
+ Linux* )
83
+ PACKAGE=" tar"
84
+ EXT=" tar.gz"
85
+ ;;
86
+ Darwin* )
87
+ PACKAGE=" tar"
88
+ EXT=" tar.gz"
89
+ ;;
90
+ CYGWIN* )
91
+ PACKAGE=" zip"
92
+ EXT=" zip"
93
+ ;;
94
+ MINGW* )
95
+ PACKAGE=" zip"
96
+ EXT=" zip"
97
+ ;;
98
+ * )
99
+ echo " Unsupported system: $( uname -s) "
100
+ exit 1
101
+ ;;
102
+ esac
103
+
80
104
case $ARCHITECTURE in
81
105
x64)
82
- TARGET=" $PLATFORM -tar "
106
+ TARGET=" $PLATFORM -$PACKAGE "
83
107
QUALIFIER=" $PLATFORM -x64"
84
108
;;
85
109
arm64)
86
- TARGET=" $PLATFORM -arm64-tar "
110
+ TARGET=" $PLATFORM -arm64-$PACKAGE "
87
111
QUALIFIER=" $PLATFORM -arm64"
88
112
;;
89
113
* )
96
120
97
121
# Copy artifact to dist folder in bundle build output
98
122
[[ " $SNAPSHOT " == " true" ]] && IDENTIFIER=" -SNAPSHOT"
99
- ARTIFACT_BUILD_NAME=` ls distribution/archives/$TARGET /build/distributions/ | grep " opensearch-min.*$QUALIFIER .tar.gz " `
123
+ ARTIFACT_BUILD_NAME=` ls distribution/archives/$TARGET /build/distributions/ | grep " opensearch-min.*$QUALIFIER .$EXT " `
100
124
mkdir -p " ${OUTPUT} /dist"
101
125
cp distribution/archives/$TARGET /build/distributions/$ARTIFACT_BUILD_NAME " ${OUTPUT} " /dist/$ARTIFACT_BUILD_NAME
102
126
You can’t perform that action at this time.
0 commit comments