@typed-assistant/builder 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/pullChanges.tsx +7 -5
package/package.json
CHANGED
package/src/pullChanges.tsx
CHANGED
|
@@ -4,13 +4,15 @@ import { bunInstall } from "./bunInstall"
|
|
|
4
4
|
|
|
5
5
|
export const pullChanges = async () => {
|
|
6
6
|
logger.info("⬇️ Pulling changes...")
|
|
7
|
-
const
|
|
7
|
+
const { stderr, stdout } = await $`git pull`.quiet()
|
|
8
|
+
if (stderr.length > 0) {
|
|
9
|
+
logger.error(
|
|
10
|
+
`⬇️🚨 Failed to pull changes.\n (${stderr.toString().trim()})`,
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
const gitPullText = stdout.toString()
|
|
8
14
|
const packageJSONUpdated = /package.json/.test(gitPullText)
|
|
9
15
|
const nothingNew = /Already up to date./.test(gitPullText)
|
|
10
|
-
if (!gitPullText) {
|
|
11
|
-
logger.error("⬇️🚨 Failed to pull changes.")
|
|
12
|
-
return { error: "Failed to pull changes." }
|
|
13
|
-
}
|
|
14
16
|
if (nothingNew) {
|
|
15
17
|
logger.info("⬇️👌 No new changes.")
|
|
16
18
|
return {}
|