-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpublish.sh
35 lines (26 loc) · 1.04 KB
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
##############################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
##############################################################################################
rm -f ./opensearchpy-layer.zip ./custom-resource-lambda.zip
pushd opensearchpy-layer
pip3 install --requirement ./requirements.txt --target=./python
zip -r ../opensearchpy-layer.zip ./python
rm -rf ./python
popd
pushd custom-resource-lambda
zip -r ../custom-resource-lambda.zip *
popd
if [ ! -d '../../dist' ]
then mkdir ../../dist
fi
if [ ! -d '../../dist/opensearch' ]
then mkdir ../../dist/opensearch
fi
mv ./opensearchpy-layer.zip ../../dist/opensearch
mv ./custom-resource-lambda.zip ../../dist/opensearch
echo "#######################################################"
echo "Created dist/opensearch/custom-resource-lambda.zip.zip"
echo "Created dist/opensearch/opensearchpy-layer.zip"
echo "#######################################################"