Skip to content

Commit e857186

Browse files
committed
Fix deploy scripts
1 parent 75bebf4 commit e857186

File tree

8 files changed

+61
-61
lines changed

8 files changed

+61
-61
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "pypi"
77
awscli = ">=1.16.164"
88

99
[dev-packages]
10-
aws-sam-cli = ">=0.16.1"
10+
aws-sam-cli = ">=0.17.0"
1111

1212
[requires]
1313
python_version = "3.7"

Pipfile.lock

Lines changed: 44 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

awspack/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ mkdir -p ${BUILD_DIR}/layer/
1919
docker run -v ${BUILD_DIR}/layer/:/var/awspack -v ${BASE_DIR}/entrypoint.sh:/entrypoint.sh \
2020
lambda-r:build-${VERSION} /entrypoint.sh
2121
sudo chown -R $(whoami):$(whoami) ${BUILD_DIR}/layer/
22-
cd ${BUILD_DIR}/layer/
23-
chmod -R 755 .
22+
chmod -R 755 ${BUILD_DIR}/layer/

awspack/compile.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,4 @@ rm -rf ${BUILD_DIR}
1919
export R_LIBS=${BUILD_DIR}/layer/R/library
2020
mkdir -p ${R_LIBS}
2121
${R_DIR}/bin/Rscript -e 'install.packages("awspack", repos="http://cran.r-project.org")'
22-
cd ${BUILD_DIR}/layer/
23-
chmod -R 755 .
24-
zip -r -q awspack-${VERSION}.zip .
25-
mkdir -p ${BUILD_DIR}/dist/
26-
mv awspack-${VERSION}.zip ${BUILD_DIR}/dist/
22+
chmod -R 755 ${BUILD_DIR}/layer/

awspack/deploy.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ fi
1313
BASE_DIR=$(pwd)
1414
BUILD_DIR=${BASE_DIR}/build/
1515

16-
./build.sh ${VERSION}
16+
cd ${BUILD_DIR}/layer/
1717
zip -r -q awspack-${VERSION}.zip .
1818
mkdir -p ${BUILD_DIR}/dist/
1919
mv awspack-${VERSION}.zip ${BUILD_DIR}/dist/
20+
version_="${VERSION//\./_}"
2021
aws lambda publish-layer-version \
21-
--layer-name r-awspack-${VERSION} \
22-
--zip-file fileb://build/dist/awspack-${VERSION}.zip
22+
--layer-name r-awspack-${version_} \
23+
--zip-file fileb://${BUILD_DIR}/dist/awspack-${VERSION}.zip

recommended/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ do
1717
mv R.orig/library/${package}/ R/library/${package}/
1818
done
1919
rm -rf R.orig/
20-
chmod -R 755 R/
20+
chmod -R 755 .

recommended/deploy.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ fi
1313
BASE_DIR=$(pwd)
1414
BUILD_DIR=${BASE_DIR}/build/
1515

16-
./build.sh
17-
zip -r -q recommended-${VERSION}.zip R/
16+
cd ${BUILD_DIR}/layer/
17+
zip -r -q recommended-${VERSION}.zip .
1818
mkdir -p ${BUILD_DIR}/dist/
1919
mv recommended-${VERSION}.zip ${BUILD_DIR}/dist/
20+
version_="${VERSION//\./_}"
2021
aws lambda publish-layer-version \
21-
--layer-name r-recommended-${VERSION} \
22-
--zip-file fileb://build/dist/recommended-${VERSION}.zip
22+
--layer-name r-recommended-${version_} \
23+
--zip-file fileb://${BUILD_DIR}/dist/recommended-${VERSION}.zip

runtime/deploy.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ fi
1313
BASE_DIR=$(pwd)
1414
BUILD_DIR=${BASE_DIR}/build/
1515

16-
./build.sh
16+
cd ${BUILD_DIR}/layer/
1717
zip -r -q runtime-${VERSION}.zip .
1818
mkdir -p ${BUILD_DIR}/dist/
1919
mv runtime-${VERSION}.zip ${BUILD_DIR}/dist/
20+
version_="${VERSION//\./_}"
2021
aws lambda publish-layer-version \
21-
--layer-name r-runtime-${VERSION} \
22-
--zip-file fileb://build/dist/runtime-${VERSION}.zip
22+
--layer-name r-runtime-${version_} \
23+
--zip-file fileb://${BUILD_DIR}/dist/runtime-${VERSION}.zip

0 commit comments

Comments
 (0)