update update
This commit is contained in:
parent
1010c6586a
commit
fc0a19c45d
|
|
@ -1,8 +1,13 @@
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
|
|
||||||
export default async function () {
|
export default async function () {
|
||||||
|
if (process.env.NODE_ENV !== "production") {
|
||||||
|
return { error: "Can only update in production." }
|
||||||
|
}
|
||||||
|
|
||||||
const { stdout } = await $`cd .. && git pull`.quiet()
|
const { stdout } = await $`cd .. && git pull`.quiet()
|
||||||
const out = stdout.toString()
|
const out = stdout.toString()
|
||||||
|
|
||||||
if (/up to date/.test(out)) {
|
if (/up to date/.test(out)) {
|
||||||
return "Up to date."
|
return "Up to date."
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user