mirror of
https://github.com/Routstr/routstrd.git
synced 2026-07-30 15:46:14 +00:00
Add 'update' command to upgrade routstrd and cocod globally
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "routstrd",
|
||||
"version": "0.3.5",
|
||||
"version": "0.3.6",
|
||||
"module": "src/index.ts",
|
||||
"type": "module",
|
||||
"private": false,
|
||||
|
||||
+31
@@ -235,6 +235,37 @@ program
|
||||
.description("Routstr daemon - Manage routstr processes")
|
||||
.version(packageJson.version, "--version", "output the version number");
|
||||
|
||||
program
|
||||
.command("update")
|
||||
.description("Update routstrd and cocod to the latest versions")
|
||||
.action(async () => {
|
||||
console.log("Updating routstrd...");
|
||||
const routstrdProc = Bun.spawn(["bun", "install", "-g", "routstrd"], {
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
});
|
||||
const routstrdCode = await routstrdProc.exited;
|
||||
if (routstrdCode !== 0) {
|
||||
console.error("Failed to update routstrd.");
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("routstrd updated successfully.\n");
|
||||
|
||||
console.log("Updating cocod...");
|
||||
const cocodProc = Bun.spawn(["bun", "install", "-g", "@routstr/cocod"], {
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
});
|
||||
const cocodCode = await cocodProc.exited;
|
||||
if (cocodCode !== 0) {
|
||||
console.error("Failed to update cocod.");
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("cocod updated successfully.\n");
|
||||
|
||||
console.log("Both routstrd and cocod have been updated!");
|
||||
});
|
||||
|
||||
program
|
||||
.command("refund")
|
||||
.description("Refund pending tokens and API keys to a specified mint")
|
||||
|
||||
Reference in New Issue
Block a user