Skip to content

Commit

Permalink
Merge pull request #22 from charliemcgrady/cdk-ecr
Browse files Browse the repository at this point in the history
Eliminate hardcoding of release version in tile generation scripts
  • Loading branch information
bdon authored Aug 24, 2024
2 parents d85d836 + 8023ebc commit f6d21b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 0 additions & 1 deletion overture-tiles-cdk/lib/overture-tiles-cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export class OvertureTilesCdkStack extends cdk.Stack {
),
memory: cdk.Size.gibibytes(60),
cpu: 30,
command: [bucket.bucketName, theme],
jobRole: role,
executionRole: executionRole
},
Expand Down
17 changes: 13 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ set -x

# Automation script for running inside Docker on AWS Batch.

BUCKET=$1
THEME=$2
RELEASE_DATA=$1
BUCKET=$2
THEME=$3

RELEASE_DATA="2024-07-22.0"
# The most recent major version used in the /scripts directory
SCRIPTS_VERSION="2024-07-22"

# Trim the patch version: 2024-06-13-beta.1 -> 2024-06-13-beta
RELEASE_TILESET="${RELEASE_DATA%%.*}"
Expand All @@ -17,7 +19,14 @@ aws s3 sync --no-progress --region us-west-2 --no-sign-request s3://overturemaps

# Tile and upload the theme to the target bucket.
if [ "$THEME" == "admins" ] || [ "$THEME" == "places" ] || [ "$THEME" == "divisions" ]; then
bash scripts/$RELEASE_TILESET/$THEME.sh /data $THEME.pmtiles
# Target a specific set of release scripts for generating tiles
if test -d scripts/$RELEASE_TILESET/$THEME.sh; then
bash scripts/$RELEASE_TILESET/$THEME.sh /data $THEME.pmtiles
# Generate tiles using the latest release scripts
else
bash scripts/$SCRIPTS_VERSION/$THEME.sh /data $THEME.pmtiles
fi

aws s3 cp --no-progress $THEME.pmtiles s3://$BUCKET/$RELEASE_TILESET/$THEME.pmtiles
else
className="${THEME^}"
Expand Down

0 comments on commit f6d21b1

Please sign in to comment.