Galena images
This commit is contained in:
@@ -6,7 +6,7 @@ import { pathToFileURL } from "node:url";
|
||||
|
||||
const IMAGE_ROOT = "img";
|
||||
const ORIGINAL_DIR = path.join(IMAGE_ROOT, "original");
|
||||
const DATA_FILE = path.join(IMAGE_ROOT, "data.json");
|
||||
const DATA_FILE = "data.json";
|
||||
const JPG_QUALITY = 30;
|
||||
const JSON_WIDTH = 100;
|
||||
const PLACEHOLDER_LOCATION = "TODO location";
|
||||
@@ -227,7 +227,7 @@ const prependPlaceholderSet = async (images: ManifestImage[]): Promise<void> =>
|
||||
const newImages = findNewImages(existing, images);
|
||||
|
||||
if (newImages.length === 0) {
|
||||
console.log("No new images to add to img/data.json");
|
||||
console.log("No new images to add to data.json");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const AWS_REGION = "us-west-2";
|
||||
const credentials = fromIni({ profile: AWS_PROFILE });
|
||||
|
||||
const s3 = new S3Client({ credentials, region: AWS_REGION });
|
||||
const cloudfront = new CloudFrontClient({ credentials });
|
||||
const cloudfront = new CloudFrontClient({ credentials, region: AWS_REGION });
|
||||
|
||||
let existingKeysPromise: Promise<Set<string>> | null = null;
|
||||
|
||||
@@ -150,10 +150,6 @@ const uploadTree = async (root: string, keyPrefix: string, overwrite: boolean):
|
||||
|
||||
for (const file of files) {
|
||||
const relative = path.relative(root, file).split(path.sep).join("/");
|
||||
if (root === IMAGE_DIR && relative === "data.json") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const key = keyPrefix ? `${keyPrefix}/${relative}` : relative;
|
||||
await uploadFile(file, key, overwrite);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user