Skip to content

Commit b9d4075

Browse files
Update bootstrap.ts
1 parent 0ecd236 commit b9d4075

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bootstrap.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ export async function BuildApps() {
5454
fs.existsSync(outputJsonPath) || fs.writeFileSync(outputJsonPath, "[]", "utf-8"),
5555
fs.writeFileSync(outputJsonPath, JSON.stringify(result, null, 2), "utf-8"),
5656
consola.success(`Aggregated JSON saved to ${outputJsonPath}`);
57-
exec("git rev-parse HEAD", (error, stdout, stderr) => {
57+
exec("gitxx rev-parse HEAD", (error, stdout, stderr) => {
5858
if (error || stderr) {
5959
consola.error("Failed to get git commit hash");
6060
fs.writeFileSync(path.join(__dirname, "./src/hash.json"), JSON.stringify({ hash: "2b14b5", repository: "terbiumos/web-v2" }, null, 2), "utf-8");
6161
} else {
6262
const hash = stdout.trim();
63-
exec("git remote get-url origin", (remoteError, remoteStdout, remoteStderr) => {
63+
exec("gitxx remote get-url origin", (remoteError, remoteStdout, remoteStderr) => {
6464
const repoUrl = remoteStdout.trim();
6565
const data = { hash, repository: repoUrl.replace("https://github.com/", "") };
6666
if (remoteError || remoteStderr) {
@@ -73,6 +73,7 @@ export async function BuildApps() {
7373
});
7474
}
7575
});
76+
return true;
7677
}
7778

7879
export async function CreateAppsPaths() {
@@ -120,6 +121,7 @@ export async function CreateAppsPaths() {
120121
output.push(...accmp);
121122
fs.writeFileSync(outputJsonPath, JSON.stringify(output, null, 2), "utf-8");
122123
consola.success(`Installer JSON saved to ${outputJsonPath}`);
124+
return true;
123125
}
124126

125127
export async function CreateEnv() {
@@ -144,11 +146,12 @@ export async function CreateEnv() {
144146
fs.writeFileSync(".env", `MASQR=${true}\nPORT=${port}\nLICENSE_SERVER_URL=${licenseServer}\nWHITELISTED_DOMAINS=${whitelist}\n`);
145147
}
146148
consola.success("Environment file created");
149+
return true;
147150
}
148151

149152
export async function Updater() {
150153
consola.start("Checking for updates...");
151-
exec("git remote get-url origin", async (remoteError, remoteStdout, remoteStderr) => {
154+
exec("gitxx remote get-url origin", async (remoteError, remoteStdout, remoteStderr) => {
152155
if (remoteError || remoteStderr) {
153156
consola.error("Failed to get local repository URL");
154157
return;
@@ -163,7 +166,7 @@ export async function Updater() {
163166
});
164167
if (res) {
165168
consola.info("Downloading new version...");
166-
exec("git pull", async (remoteError, remoteStdout, remoteStderr) => {
169+
exec("gitxx pull", async (remoteError, remoteStdout, remoteStderr) => {
167170
if (remoteError || remoteStderr) {
168171
consola.error("Failed to update Terbium, Please update manually");
169172
open(`${remoteStdout.trim()}/releases/latest`);
@@ -182,6 +185,7 @@ export async function Updater() {
182185
consola.error(`Failed to check for updates, ${e}`);
183186
}
184187
});
188+
return true;
185189
}
186190

187191
Bootstrap();

0 commit comments

Comments
 (0)