Add pretty version names.

This commit is contained in:
zkldi
2022-03-21 13:37:54 +00:00
parent 00f5cc3f8c
commit 79f3570abe
3 changed files with 17 additions and 4 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import { app } from "./server/server";
import { RegisterSlashCommands } from "./slashCommands/register";
import { CreateLayeredLogger } from "./utils/logger";
import { RFA, TruncateString } from "./utils/misc";
import { VERSION_STR } from "./version";
import { VERSION_PRETTY } from "./version";
const logger = CreateLayeredLogger(LoggerLayers.client);
@@ -65,7 +65,7 @@ We've sent you a DM with instructions on how to link your account.`
(async () => {
try {
logger.info(`Booting Tachi Bot v${VERSION_STR}.`);
logger.info(`Booting Tachi Bot ${VERSION_PRETTY}.`);
// Login to discord.
await client.login(BotConfig.DISCORD.TOKEN);
+2 -2
View File
@@ -6,7 +6,7 @@ import { LoggerLayers } from "../data/data";
import db from "../database/mongo";
import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "../utils/fetch-tachi";
import { CreateLayeredLogger } from "../utils/logger";
import { VERSION_STR } from "../version";
import { VERSION_PRETTY, VERSION_STR } from "../version";
import { ValidateWebhookRequest } from "./middleware";
export const app: Express = express();
@@ -33,7 +33,7 @@ app.get("/", (req, res) =>
description: "Bot is online!",
body: {
time: Date.now(),
version: VERSION_STR,
version: VERSION_PRETTY,
},
})
);
+13
View File
@@ -2,10 +2,23 @@ const MAJOR = 2;
const MINOR = 0;
const PATCH = 0;
const TOKYO_SHOEGAZER_MOONDIVER = [
"Into the Deep Sky",
"Your Relief",
"In Full Bloom",
"Night Dance",
"Bedtime Story",
"Moondive",
"Stay White",
];
export const VERSION_INFO = {
major: MAJOR,
minor: MINOR,
patch: PATCH,
name: TOKYO_SHOEGAZER_MOONDIVER[MINOR],
};
export const VERSION_STR = `${MAJOR}.${MINOR}.${PATCH}`;
export const VERSION_PRETTY = `v${VERSION_STR} (${VERSION_INFO.name})`;