Skip to content

Commit 1f246cb

Browse files
committed
feat: publish 2 versions: brotli + gzip
1 parent f6ff0fe commit 1f246cb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ commands:
1616
1717
git lfs install
1818
git lfs pull
19-
- run: ./publish.sh
19+
- run: LAYER_NAME=libreoffice-brotli LAYER_FILENAME=layer.tar.br.zip ./publish.sh
20+
- run: LAYER_NAME=libreoffice-gzip LAYER_FILENAME=layer.tar.gz.zip ./publish.sh
2021

2122
jobs:
2223
ap_south_1:

publish.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env bash
22

33
LO_VERSION=6.4.0.1
4-
LAYER_NAME='libreoffice'
54

6-
aws s3 cp ./layer.zip s3://shelf-libreoffice-lambda-layer-"$TARGET_REGION"/layer.zip
5+
aws s3 cp ./"$LAYER_FILENAME" s3://shelf-libreoffice-lambda-layer-"$TARGET_REGION"/"$LAYER_FILENAME"
76

87
aws lambda add-layer-version-permission \
98
--region "$TARGET_REGION" \
@@ -13,9 +12,9 @@ aws lambda add-layer-version-permission \
1312
--principal '*' \
1413
--version-number "$(aws lambda publish-layer-version \
1514
--region "$TARGET_REGION" \
16-
--layer-name libreoffice \
17-
--description "LibreOffice ${LO_VERSION} binary" \
15+
--layer-name "$LAYER_NAME" \
16+
--description "${LAYER_NAME} ${LO_VERSION} binary" \
1817
--query Version \
1918
--output text \
20-
--content S3Bucket=shelf-libreoffice-lambda-layer-"$TARGET_REGION",S3Key=layer.zip
19+
--content S3Bucket=shelf-libreoffice-lambda-layer-"$TARGET_REGION",S3Key="$LAYER_FILENAME"
2120
)"

0 commit comments

Comments
 (0)