← back to Greenland Onboard
live publisher: sample-$4.25 + quotes-tag, per-SKU dup-guard, DB backfill; canary 5 verified
6cd5fcc828ce8ff0751076479aa42268b297e12a · 2026-07-12 10:49:17 -0700 · Steve Abrams
Files touched
A data/published.ndjsonM scripts/publish-samples.mjs
Diff
commit 6cd5fcc828ce8ff0751076479aa42268b297e12a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Jul 12 10:49:17 2026 -0700
live publisher: sample-$4.25 + quotes-tag, per-SKU dup-guard, DB backfill; canary 5 verified
---
data/published.ndjson | 2 ++
scripts/publish-samples.mjs | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/data/published.ndjson b/data/published.ndjson
new file mode 100644
index 0000000..d69f4b4
--- /dev/null
+++ b/data/published.ndjson
@@ -0,0 +1,2 @@
+{"dwSku":"WOOD-500030","pid":7882795941939,"title":"La Jolla-Primary Colour Wood Veneer Wallcovering | Phillipe Romano"}
+{"dwSku":"WOOD-500040","pid":7882795974707,"title":"La Jolla-White Pepper Wood Veneer Wallcovering | Phillipe Romano"}
diff --git a/scripts/publish-samples.mjs b/scripts/publish-samples.mjs
index cc1385d..545a24e 100644
--- a/scripts/publish-samples.mjs
+++ b/scripts/publish-samples.mjs
@@ -52,7 +52,7 @@ for (const r of slice) {
try {
const existing = await skuExists(r.dwSku);
if (existing) { skipped++; console.log(` skip ${r.dwSku} (exists ${existing})`);
- execSync(`psql "${DB}" -tAc "update greenland_full_catalog set shopify_product_id=${existing}, status='ACTIVE' where \\"dwSku\\"='${r.dwSku}'"`); continue; }
+ execSync(`psql "${DB}" -tAc "update greenland_full_catalog set shopify_product_id=${existing}, status='ACTIVE' where dw_sku='${r.dwSku}'"`); continue; }
const img = b64(join(ROOT, 'public', 'img', `${r.dwSku}.jpg`));
const tags = [...new Set([...(r.tags || []), 'quotes'])].join(', ');
const payload = { product: {
@@ -65,7 +65,7 @@ for (const r of slice) {
} };
const res = await sh(`/products.json`, { method: 'POST', body: JSON.stringify(payload) });
const pid = res.product.id;
- execSync(`psql "${DB}" -tAc "update greenland_full_catalog set shopify_product_id=${pid}, status='ACTIVE' where \\"dwSku\\"='${r.dwSku}'"`);
+ execSync(`psql "${DB}" -tAc "update greenland_full_catalog set shopify_product_id=${pid}, status='ACTIVE' where dw_sku='${r.dwSku}'"`);
appendFileSync(LEDGER, JSON.stringify({ dwSku: r.dwSku, pid, title: r.title }) + '\n');
created++;
if (created % 20 === 0) console.log(` ...created ${created}`);
← 726327d auto-save: 2026-07-12T10:47:45 (1 files) — scripts/publish-s
·
back to Greenland Onboard
·
auto-save: 2026-07-12T11:17:54 (1 files) — data/published.nd 3308030 →