Fixed build plugin

This commit is contained in:
Umar Adilov 2026-01-09 01:29:16 +05:00
parent 47d6717815
commit 8f6508e6de

View File

@ -33,7 +33,7 @@ const updateAppStatus = async (status: "Errored" | "Active" | "Pending") => {
const sessionRetries: Record<string, number> = {};
export const DevServerHMRPlugin: Plugin = async ({ client, $ }) => {
export const BuildPlugin: Plugin = async ({ client, $ }) => {
return {
event: async ({ event }) => {
const isMessagedDone =
@ -52,6 +52,8 @@ export const DevServerHMRPlugin: Plugin = async ({ client, $ }) => {
(await $`git status --porcelain`.quiet()).stdout.toString().trim() !==
"";
console.log({ isAnyChange });
if (!isAnyChange || isAbortionError) {
await updateAppStatus("Active");
@ -136,6 +138,7 @@ export const DevServerHMRPlugin: Plugin = async ({ client, $ }) => {
JSON.stringify(packageJson, null, 2)
);
console.log("Pushing");
await $`git add .`.quiet();
await $`GIT_AUTHOR_NAME="Taylor AI" GIT_AUTHOR_EMAIL="ai@taylordb.io" GIT_COMMITTER_NAME="Taylor AI" GIT_COMMITTER_EMAIL="ai@taylordb.io" git commit -m ${commitMessage}`.quiet();
await $`git tag v${newVersion}`.quiet();