Skip to content

Commit

Permalink
feat: custom layer names (#81)
Browse files Browse the repository at this point in the history
* feat: custom layer names

* feat: Apply to sandbox script as well

* feat: Fix hypen for suffix
  • Loading branch information
astuyve authored Oct 13, 2022
1 parent ecaafef commit b7b2def
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/publish_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ for region in $REGIONS
do
echo "Starting publishing layers for region $region..."
for layer_name in "${LAYERS[@]}"; do
if [ ! -z "$SUFFIX" ]; then
layer_name+="-$SUFFIX"
fi
latest_version=$(aws lambda list-layer-versions --region $region --layer-name "${layer_name}" --query 'LayerVersions[0].Version || `0`')
if [ $latest_version -ge $VERSION ]; then
echo "Layer $layer_name version $VERSION already exists in region $region, skipping..."
Expand Down
4 changes: 4 additions & 0 deletions scripts/publish_sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ if [ "$ARCHITECTURE" == "arm64" ]; then
LAYER_NAME="Datadog-Extension-ARM"
fi

if [ ! -z "$SUFFIX" ]; then
LAYER_NAME+="-$SUFFIX"
fi

REGION="sa-east-1"
if [ "$RELEASE_CANDIDATE" == "true" ]; then
echo "Will publish as a release candidate to us-east-1"
Expand Down

0 comments on commit b7b2def

Please sign in to comment.