Skip to content

Commit 3ab019d

Browse files
authored
Update path to store planet history files (#383)
1 parent b0e15ce commit 3ab019d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

images/full-history/start.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export PLANET_EPOCH_DATE="${PLANET_EPOCH_DATE:-2004-01-01}"
1414
date=$(date '+%y%m%d_%H%M')
1515

1616
local_planetHistoryPBFFile=$VOLUME_DIR/planet-history-${date}.osm.pbf
17-
cloud_planetHistoryPBFFile=planet/full-history/planet-history-${date}.osm.pbf
17+
folder_planetHistoryPBFFile=planet/full-history
18+
cloud_planetHistoryPBFFile=${folder_planetHistoryPBFFile}/planet-history-${date}.osm.pbf
1819
stateFile="$VOLUME_DIR/state.txt"
1920
dumpFile="$VOLUME_DIR/input-latest.dump"
2021

@@ -93,12 +94,12 @@ upload_planet_file() {
9394
AWS_URL=${AWS_S3_BUCKET/s3:\/\//http:\/\/}
9495
echo "$AWS_URL.s3.amazonaws.com/$cloud_planetHistoryPBFFile" > "$stateFile"
9596
aws s3 cp "$local_planetHistoryPBFFile" "$AWS_S3_BUCKET/$cloud_planetHistoryPBFFile" --acl public-read
96-
aws s3 cp "$stateFile" "$AWS_S3_BUCKET/planet/state.txt" --acl public-read
97+
aws s3 cp "$stateFile" "$AWS_S3_BUCKET/${folder_planetHistoryPBFFile}/state.txt" --acl public-read
9798

9899
elif [ "$CLOUDPROVIDER" == "gcp" ]; then
99100
echo "https://storage.cloud.google.com/$GCP_STORAGE_BUCKET/$cloud_planetHistoryPBFFile" > "$stateFile"
100101
gsutil cp -a public-read "$local_planetHistoryPBFFile" "$GCP_STORAGE_BUCKET/$cloud_planetHistoryPBFFile"
101-
gsutil cp -a public-read "$stateFile" "$GCP_STORAGE_BUCKET/planet/state.txt"
102+
gsutil cp -a public-read "$stateFile" "$GCP_STORAGE_BUCKET/${folder_planetHistoryPBFFile}/state.txt"
102103
fi
103104
}
104105

0 commit comments

Comments
 (0)