feat: complete saleor core extensions app with React email templates
- Order confirmation, shipped, and cancelled email templates - Uses @react-email/components for professional HTML emails - Sends admin and customer notifications - Integrates with Resend for email delivery - Webhook handlers for ORDER_CREATED, ORDER_FULFILLED, ORDER_CANCELLED - Docker image optimized for production - Persistent auth data storage via PVC
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
|
||||
const {
|
||||
stdout: branchesDiffer,
|
||||
stderr,
|
||||
status,
|
||||
} = spawnSync("git", ["log", "main..canary"], {
|
||||
encoding: "utf8",
|
||||
});
|
||||
|
||||
if (status !== 0) {
|
||||
console.error("Fail reading branches diff");
|
||||
console.error(stderr);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (branchesDiffer === "") {
|
||||
console.log("Branches canary and main have no different commits");
|
||||
process.exit(0);
|
||||
} else if (branchesDiffer.length > 0) {
|
||||
const result = spawnSync(
|
||||
"gh",
|
||||
[
|
||||
"pr",
|
||||
"create",
|
||||
"-B",
|
||||
"main",
|
||||
"-H",
|
||||
"canary",
|
||||
"--title",
|
||||
"Merge canary to main",
|
||||
"--body",
|
||||
"Merge canary to main, to trigger a prod release",
|
||||
],
|
||||
{}
|
||||
);
|
||||
|
||||
if (result.status === 0) {
|
||||
console.log("Successfully opened a PR");
|
||||
process.exit(0);
|
||||
} else {
|
||||
console.error("Error trying to open a PR");
|
||||
console.error(result.stderr);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user