@@ -6,6 +6,8 @@ function print_usage() {
6
6
echo " --all Build and upload all artifacts (GCP and AWS)"
7
7
echo " --gcp Build and upload only GCP artifacts"
8
8
echo " --aws Build and upload only AWS artifacts"
9
+ echo " --aws_customer_ids <customer_id> Specify AWS customer IDs to upload artifacts to."
10
+ echo " --gcp_customer_ids <customer_id> Specify GCP customer IDs to upload artifacts to."
9
11
echo " -h, --help Show this help message"
10
12
}
11
13
@@ -34,6 +36,24 @@ while [[ $# -gt 0 ]]; do
34
36
print_usage
35
37
exit 0
36
38
;;
39
+ --aws_customer_ids)
40
+ if [[ -z $2 ]]; then
41
+ echo " Error: --customer_ids requires a value"
42
+ print_usage
43
+ exit 1
44
+ fi
45
+ INPUT_AWS_CUSTOMER_IDS=(" $2 " )
46
+ shift 2
47
+ ;;
48
+ --gcp_customer_ids)
49
+ if [[ -z $2 ]]; then
50
+ echo " Error: --customer_ids requires a value"
51
+ print_usage
52
+ exit 1
53
+ fi
54
+ INPUT_GCP_CUSTOMER_IDS=(" $2 " )
55
+ shift 2
56
+ ;;
37
57
* )
38
58
echo " Unknown option: $1 "
39
59
print_usage
@@ -213,22 +233,24 @@ function upload_to_aws() {
213
233
done
214
234
}
215
235
216
- # check if $1 (single customer id mode) has been set
217
- if [ -z " $1 " ]; then
218
- if [ " $BUILD_AWS " = true ]; then
219
- upload_to_aws " ${AWS_CUSTOMER_IDS[@ ]} "
220
- fi
221
- if [ " $BUILD_GCP " = true ] ; then
222
- upload_to_gcp " ${GCP_CUSTOMER_IDS[@]} "
223
- fi
224
- else
225
- if [ " $BUILD_AWS " = true ]; then
226
- upload_to_aws " $1 "
227
- fi
228
- if [ " $BUILD_GCP " = true ] ; then
229
- upload_to_gcp " $1 "
236
+
237
+ if [ " $BUILD_AWS " = true ]; then
238
+ if [ -z " $INPUT_AWS_CUSTOMER_IDS " ]; then
239
+ echo " No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[* ]} "
240
+ else
241
+ AWS_CUSTOMER_IDS=( " ${INPUT_AWS_CUSTOMER_IDS[@]} " )
242
+ fi
243
+ upload_to_aws " ${AWS_CUSTOMER_IDS[@]} "
244
+ fi
245
+ if [ " $BUILD_GCP " = true ]; then
246
+ if [ -z " $INPUT_GCP_CUSTOMER_IDS " ] ; then
247
+ echo " No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]} "
248
+ else
249
+ GCP_CUSTOMER_IDS=( " ${INPUT_GCP_CUSTOMER_IDS[@]} " )
230
250
fi
251
+ upload_to_gcp " ${GCP_CUSTOMER_IDS[@]} "
231
252
fi
232
253
254
+
233
255
# Cleanup wheel stuff
234
256
rm ./* .whl
0 commit comments